From 9c665e34f670927dba242af3d5215b926a58495a Mon Sep 17 00:00:00 2001 From: Noah Dietz Date: Fri, 17 Jul 2026 20:19:24 +0000 Subject: [PATCH] feat(productregistry): onboard v1 API --- gapic-libraries-bom/pom.xml | 7 + java-productregistry/.repo-metadata.json | 15 + java-productregistry/README.md | 210 ++ .../google-cloud-productregistry-bom/pom.xml | 45 + .../google-cloud-productregistry/pom.xml | 117 ++ ...CloudProductRegistryReadServiceClient.java | 1415 +++++++++++++ ...oudProductRegistryReadServiceSettings.java | 316 +++ .../productregistry/v1/gapic_metadata.json | 39 + .../productregistry/v1/package-info.java | 45 + .../CloudProductRegistryReadServiceStub.java | 103 + ...roductRegistryReadServiceStubSettings.java | 764 +++++++ ...uctRegistryReadServiceCallableFactory.java | 115 ++ ...pcCloudProductRegistryReadServiceStub.java | 432 ++++ ...uctRegistryReadServiceCallableFactory.java | 103 + ...onCloudProductRegistryReadServiceStub.java | 625 ++++++ .../productregistry/v1/stub/Version.java | 27 + .../reflect-config.json | 1550 ++++++++++++++ ...RegistryReadServiceClientHttpJsonTest.java | 640 ++++++ ...dProductRegistryReadServiceClientTest.java | 581 ++++++ .../MockCloudProductRegistryReadService.java | 59 + ...ckCloudProductRegistryReadServiceImpl.java | 214 ++ .../pom.xml | 45 + .../CloudProductRegistryReadServiceGrpc.java | 1299 ++++++++++++ java-productregistry/pom.xml | 58 + .../clirr-ignored-differences.xml | 80 + .../pom.xml | 41 + .../CloudProductRegistryReadServiceProto.java | 299 +++ .../v1/GetLogicalProductRequest.java | 622 ++++++ .../v1/GetLogicalProductRequestOrBuilder.java | 60 + .../v1/GetLogicalProductVariantRequest.java | 629 ++++++ ...LogicalProductVariantRequestOrBuilder.java | 60 + .../v1/GetProductSuiteRequest.java | 618 ++++++ .../v1/GetProductSuiteRequestOrBuilder.java | 60 + .../productregistry/v1/LifecycleState.java | 247 +++ .../v1/LifecycleStateProto.java | 72 + .../v1/ListLogicalProductVariantsRequest.java | 970 +++++++++ ...ogicalProductVariantsRequestOrBuilder.java | 114 + .../ListLogicalProductVariantsResponse.java | 1209 +++++++++++ ...gicalProductVariantsResponseOrBuilder.java | 124 ++ .../v1/ListLogicalProductsRequest.java | 943 +++++++++ .../ListLogicalProductsRequestOrBuilder.java | 108 + .../v1/ListLogicalProductsResponse.java | 1142 ++++++++++ .../ListLogicalProductsResponseOrBuilder.java | 113 + .../v1/ListProductSuitesRequest.java | 734 +++++++ .../v1/ListProductSuitesRequestOrBuilder.java | 77 + .../v1/ListProductSuitesResponse.java | 1136 ++++++++++ .../ListProductSuitesResponseOrBuilder.java | 112 + .../productregistry/v1/LogicalProduct.java | 1836 +++++++++++++++++ .../v1/LogicalProductName.java | 171 ++ .../v1/LogicalProductOrBuilder.java | 260 +++ .../v1/LogicalProductProto.java | 117 ++ .../v1/LogicalProductVariant.java | 1314 ++++++++++++ .../v1/LogicalProductVariantName.java | 197 ++ .../v1/LogicalProductVariantOrBuilder.java | 166 ++ .../v1/LogicalProductVariantProto.java | 108 + .../v1/LookupEntityRequest.java | 625 ++++++ .../v1/LookupEntityRequestOrBuilder.java | 62 + .../v1/LookupEntityResponse.java | 1432 +++++++++++++ .../v1/LookupEntityResponseOrBuilder.java | 145 ++ .../productregistry/v1/ProductSuite.java | 1456 +++++++++++++ .../productregistry/v1/ProductSuiteName.java | 171 ++ .../v1/ProductSuiteOrBuilder.java | 200 ++ .../productregistry/v1/ProductSuiteProto.java | 104 + .../cloud_product_registry_read_service.proto | 256 +++ .../productregistry/v1/lifecycle_state.proto | 47 + .../productregistry/v1/logical_product.proto | 82 + .../v1/logical_product_variant.proto | 68 + .../productregistry/v1/product_suite.proto | 70 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../SyncCreateUseHttpJsonTransport.java | 41 + .../AsyncGetLogicalProduct.java | 51 + .../SyncGetLogicalProduct.java | 47 + ...ncGetLogicalProductLogicalproductname.java | 43 + .../SyncGetLogicalProductString.java | 43 + .../AsyncGetLogicalProductVariant.java | 53 + .../SyncGetLogicalProductVariant.java | 48 + ...oductVariantLogicalproductvariantname.java | 45 + .../SyncGetLogicalProductVariantString.java | 44 + .../getproductsuite/AsyncGetProductSuite.java | 51 + .../getproductsuite/SyncGetProductSuite.java | 47 + .../SyncGetProductSuiteProductsuitename.java | 43 + .../SyncGetProductSuiteString.java | 43 + .../AsyncListLogicalProducts.java | 56 + .../AsyncListLogicalProductsPaged.java | 62 + .../SyncListLogicalProducts.java | 51 + .../AsyncListLogicalProductVariants.java | 57 + .../AsyncListLogicalProductVariantsPaged.java | 65 + .../SyncListLogicalProductVariants.java | 52 + ...icalProductVariantsLogicalproductname.java | 46 + .../SyncListLogicalProductVariantsString.java | 46 + .../AsyncListProductSuites.java | 55 + .../AsyncListProductSuitesPaged.java | 61 + .../SyncListProductSuites.java | 50 + .../lookupentity/AsyncLookupEntity.java | 48 + .../lookupentity/SyncLookupEntity.java | 44 + .../getproductsuite/SyncGetProductSuite.java | 57 + .../getproductsuite/SyncGetProductSuite.java | 58 + librarian.yaml | 4 + pom.xml | 1 + versions.txt | 5 + 101 files changed, 28785 insertions(+) create mode 100644 java-productregistry/.repo-metadata.json create mode 100644 java-productregistry/README.md create mode 100644 java-productregistry/google-cloud-productregistry-bom/pom.xml create mode 100644 java-productregistry/google-cloud-productregistry/pom.xml create mode 100644 java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceClient.java create mode 100644 java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceSettings.java create mode 100644 java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/gapic_metadata.json create mode 100644 java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/package-info.java create mode 100644 java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/CloudProductRegistryReadServiceStub.java create mode 100644 java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/CloudProductRegistryReadServiceStubSettings.java create mode 100644 java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/GrpcCloudProductRegistryReadServiceCallableFactory.java create mode 100644 java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/GrpcCloudProductRegistryReadServiceStub.java create mode 100644 java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/HttpJsonCloudProductRegistryReadServiceCallableFactory.java create mode 100644 java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/HttpJsonCloudProductRegistryReadServiceStub.java create mode 100644 java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/Version.java create mode 100644 java-productregistry/google-cloud-productregistry/src/main/resources/META-INF/native-image/com.google.cloud.productregistry.v1/reflect-config.json create mode 100644 java-productregistry/google-cloud-productregistry/src/test/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceClientHttpJsonTest.java create mode 100644 java-productregistry/google-cloud-productregistry/src/test/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceClientTest.java create mode 100644 java-productregistry/google-cloud-productregistry/src/test/java/com/google/cloud/productregistry/v1/MockCloudProductRegistryReadService.java create mode 100644 java-productregistry/google-cloud-productregistry/src/test/java/com/google/cloud/productregistry/v1/MockCloudProductRegistryReadServiceImpl.java create mode 100644 java-productregistry/grpc-google-cloud-productregistry-v1/pom.xml create mode 100644 java-productregistry/grpc-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceGrpc.java create mode 100644 java-productregistry/pom.xml create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/clirr-ignored-differences.xml create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/pom.xml create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceProto.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetLogicalProductRequest.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetLogicalProductRequestOrBuilder.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetLogicalProductVariantRequest.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetLogicalProductVariantRequestOrBuilder.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetProductSuiteRequest.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetProductSuiteRequestOrBuilder.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LifecycleState.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LifecycleStateProto.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductVariantsRequest.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductVariantsRequestOrBuilder.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductVariantsResponse.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductVariantsResponseOrBuilder.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductsRequest.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductsRequestOrBuilder.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductsResponse.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductsResponseOrBuilder.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListProductSuitesRequest.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListProductSuitesRequestOrBuilder.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListProductSuitesResponse.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListProductSuitesResponseOrBuilder.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProduct.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductName.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductOrBuilder.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductProto.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductVariant.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductVariantName.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductVariantOrBuilder.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductVariantProto.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LookupEntityRequest.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LookupEntityRequestOrBuilder.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LookupEntityResponse.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LookupEntityResponseOrBuilder.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ProductSuite.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ProductSuiteName.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ProductSuiteOrBuilder.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ProductSuiteProto.java create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/cloud_product_registry_read_service.proto create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/lifecycle_state.proto create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/logical_product.proto create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/logical_product_variant.proto create mode 100644 java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/product_suite.proto create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/create/SyncCreateSetEndpoint.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/create/SyncCreateUseHttpJsonTransport.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproduct/AsyncGetLogicalProduct.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproduct/SyncGetLogicalProduct.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproduct/SyncGetLogicalProductLogicalproductname.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproduct/SyncGetLogicalProductString.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproductvariant/AsyncGetLogicalProductVariant.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproductvariant/SyncGetLogicalProductVariant.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproductvariant/SyncGetLogicalProductVariantLogicalproductvariantname.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproductvariant/SyncGetLogicalProductVariantString.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getproductsuite/AsyncGetProductSuite.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getproductsuite/SyncGetProductSuite.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getproductsuite/SyncGetProductSuiteProductsuitename.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getproductsuite/SyncGetProductSuiteString.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproducts/AsyncListLogicalProducts.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproducts/AsyncListLogicalProductsPaged.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproducts/SyncListLogicalProducts.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/AsyncListLogicalProductVariants.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/AsyncListLogicalProductVariantsPaged.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/SyncListLogicalProductVariants.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/SyncListLogicalProductVariantsLogicalproductname.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/SyncListLogicalProductVariantsString.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listproductsuites/AsyncListProductSuites.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listproductsuites/AsyncListProductSuitesPaged.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listproductsuites/SyncListProductSuites.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/lookupentity/AsyncLookupEntity.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/lookupentity/SyncLookupEntity.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservicesettings/getproductsuite/SyncGetProductSuite.java create mode 100644 java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/stub/cloudproductregistryreadservicestubsettings/getproductsuite/SyncGetProductSuite.java diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index 2a45129f119e..91b7ce5ba7b0 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -1129,6 +1129,13 @@ pom import + + com.google.cloud + google-cloud-productregistry-bom + 0.1.0-SNAPSHOT + pom + import + com.google.cloud google-cloud-profiler-bom diff --git a/java-productregistry/.repo-metadata.json b/java-productregistry/.repo-metadata.json new file mode 100644 index 000000000000..378d42b4d0ed --- /dev/null +++ b/java-productregistry/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "api_shortname": "cloudproductregistry", + "name_pretty": "Cloud Product Registry", + "product_documentation": "https://docs.cloud.google.com/product-registry", + "api_description": "cloudproductregistry.googleapis.com API.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-productregistry/latest/overview", + "release_level": "preview", + "transport": "grpc+rest", + "language": "java", + "repo": "googleapis/google-cloud-java", + "repo_short": "java-productregistry", + "distribution_name": "com.google.cloud:google-cloud-productregistry", + "api_id": "cloudproductregistry.googleapis.com", + "library_type": "GAPIC_AUTO" +} \ No newline at end of file diff --git a/java-productregistry/README.md b/java-productregistry/README.md new file mode 100644 index 000000000000..f6582abdd84c --- /dev/null +++ b/java-productregistry/README.md @@ -0,0 +1,210 @@ +# Google Cloud Product Registry Client for Java + +Java idiomatic client for [Cloud Product Registry][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + + +## Quickstart + +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: + +```xml + + + + com.google.cloud + libraries-bom + 26.83.0 + pom + import + + + + + + + com.google.cloud + google-cloud-productregistry + + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + +```xml + + com.google.cloud + google-cloud-productregistry + 0.0.0 + +``` + +If you are using Gradle 5.x or later, add this to your dependencies: + +```Groovy +implementation platform('com.google.cloud:libraries-bom:26.83.0') + +implementation 'com.google.cloud:google-cloud-productregistry' +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-productregistry:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-productregistry" % "0.0.0" +``` + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Cloud Product Registry APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Cloud Product Registry API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Cloud Product Registry [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Cloud Product Registry. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-productregistry` library. See the [Quickstart](#quickstart) section +to add `google-cloud-productregistry` as a dependency in your code. + +## About Cloud Product Registry + + +[Cloud Product Registry][product-docs] cloudproductregistry.googleapis.com API. + +See the [Cloud Product Registry client library docs][javadocs] to learn how to +use this Cloud Product Registry Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Cloud Product Registry uses both gRPC and HTTP/JSON for the transport layer. + +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://docs.cloud.google.com/product-registry +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-productregistry/latest/overview +[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-productregistry.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-productregistry/0.0.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 +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-cli]: https://cloud.google.com/cli +[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md +[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudproductregistry.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/java-productregistry/google-cloud-productregistry-bom/pom.xml b/java-productregistry/google-cloud-productregistry-bom/pom.xml new file mode 100644 index 000000000000..5695ea1e8a66 --- /dev/null +++ b/java-productregistry/google-cloud-productregistry-bom/pom.xml @@ -0,0 +1,45 @@ + + + 4.0.0 + com.google.cloud + google-cloud-productregistry-bom + 0.1.0-SNAPSHOT + pom + + com.google.cloud + google-cloud-pom-parent + 1.89.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google Cloud Product Registry BOM + + BOM for Cloud Product Registry + + + + true + + + + + + + com.google.cloud + google-cloud-productregistry + 0.1.0-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-productregistry-v1 + 0.1.0-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-productregistry-v1 + 0.1.0-SNAPSHOT + + + + + \ No newline at end of file diff --git a/java-productregistry/google-cloud-productregistry/pom.xml b/java-productregistry/google-cloud-productregistry/pom.xml new file mode 100644 index 000000000000..97519ea36aa7 --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/pom.xml @@ -0,0 +1,117 @@ + + + 4.0.0 + com.google.cloud + google-cloud-productregistry + 0.1.0-SNAPSHOT + jar + Google Cloud Product Registry + Cloud Product Registry cloudproductregistry.googleapis.com API. + + com.google.cloud + google-cloud-productregistry-parent + 0.1.0-SNAPSHOT + + + google-cloud-productregistry + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.api + api-common + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + + com.google.api.grpc + proto-google-cloud-productregistry-v1 + + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + com.google.api + gax-httpjson + + + com.google.api.grpc + proto-google-iam-v1 + + + org.threeten + threetenbp + + + + + com.google.api.grpc + grpc-google-common-protos + test + + + com.google.api.grpc + grpc-google-iam-v1 + test + + + junit + junit + test + + + + com.google.api.grpc + grpc-google-cloud-productregistry-v1 + test + + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + \ No newline at end of file diff --git a/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceClient.java b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceClient.java new file mode 100644 index 000000000000..f76c9491416a --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceClient.java @@ -0,0 +1,1415 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.productregistry.v1.stub.CloudProductRegistryReadServiceStub; +import com.google.cloud.productregistry.v1.stub.CloudProductRegistryReadServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Cloud Product Registry Read Service provides capabilities to access all + * first and third party Google Cloud products. + * + *

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 (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+ *     CloudProductRegistryReadServiceClient.create()) {
+ *   ProductSuiteName name = ProductSuiteName.of("[PRODUCT_SUITE]");
+ *   ProductSuite response = cloudProductRegistryReadServiceClient.getProductSuite(name);
+ * }
+ * }
+ * + *

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

GetProductSuite

Get details of a ProductSuite.

+ *

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

+ *
    + *
  • getProductSuite(GetProductSuiteRequest request) + *

+ *

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

+ *
    + *
  • getProductSuite(ProductSuiteName name) + *

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

+ *
    + *
  • getProductSuiteCallable() + *

+ *

ListProductSuites

Lists ProductSuites.

+ *

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

+ *
    + *
  • listProductSuites(ListProductSuitesRequest request) + *

+ *

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

+ *
    + *
  • listProductSuitesPagedCallable() + *

  • listProductSuitesCallable() + *

+ *

GetLogicalProduct

Gets details of a LogicalProduct.

+ *

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

+ *
    + *
  • getLogicalProduct(GetLogicalProductRequest request) + *

+ *

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

+ *
    + *
  • getLogicalProduct(LogicalProductName name) + *

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

+ *
    + *
  • getLogicalProductCallable() + *

+ *

ListLogicalProducts

Lists LogicalProducts matching given criteria.

+ *

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

+ *
    + *
  • listLogicalProducts(ListLogicalProductsRequest request) + *

+ *

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

+ *
    + *
  • listLogicalProductsPagedCallable() + *

  • listLogicalProductsCallable() + *

+ *

GetLogicalProductVariant

Get details of a LogicalProductVariant.

+ *

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

+ *
    + *
  • getLogicalProductVariant(GetLogicalProductVariantRequest request) + *

+ *

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

+ *
    + *
  • getLogicalProductVariant(LogicalProductVariantName name) + *

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

+ *
    + *
  • getLogicalProductVariantCallable() + *

+ *

ListLogicalProductVariants

Lists LogicalProductVariants matching given criteria.

+ *

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

+ *
    + *
  • listLogicalProductVariants(ListLogicalProductVariantsRequest request) + *

+ *

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

+ *
    + *
  • listLogicalProductVariants(LogicalProductName parent) + *

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

+ *
    + *
  • listLogicalProductVariantsPagedCallable() + *

  • listLogicalProductVariantsCallable() + *

+ *

LookupEntity

Look up entities.

+ *

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

+ *
    + *
  • lookupEntity(LookupEntityRequest request) + *

+ *

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

+ *
    + *
  • lookupEntityCallable() + *

+ *
+ * + *

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 + * CloudProductRegistryReadServiceSettings 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
+ * CloudProductRegistryReadServiceSettings cloudProductRegistryReadServiceSettings =
+ *     CloudProductRegistryReadServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+ *     CloudProductRegistryReadServiceClient.create(cloudProductRegistryReadServiceSettings);
+ * }
+ * + *

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
+ * CloudProductRegistryReadServiceSettings cloudProductRegistryReadServiceSettings =
+ *     CloudProductRegistryReadServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+ *     CloudProductRegistryReadServiceClient.create(cloudProductRegistryReadServiceSettings);
+ * }
+ * + *

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
+ * CloudProductRegistryReadServiceSettings cloudProductRegistryReadServiceSettings =
+ *     CloudProductRegistryReadServiceSettings.newHttpJsonBuilder().build();
+ * CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+ *     CloudProductRegistryReadServiceClient.create(cloudProductRegistryReadServiceSettings);
+ * }
+ * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   ProductSuiteName name = ProductSuiteName.of("[PRODUCT_SUITE]");
+   *   ProductSuite response = cloudProductRegistryReadServiceClient.getProductSuite(name);
+   * }
+   * }
+ * + * @param name Required. The name of the ProductSuite to retrieve. Format: + * productSuites/{product_suite} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSuite getProductSuite(@Nullable ProductSuiteName name) { + GetProductSuiteRequest request = + GetProductSuiteRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getProductSuite(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get details of a ProductSuite. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   String name = ProductSuiteName.of("[PRODUCT_SUITE]").toString();
+   *   ProductSuite response = cloudProductRegistryReadServiceClient.getProductSuite(name);
+   * }
+   * }
+ * + * @param name Required. The name of the ProductSuite to retrieve. Format: + * productSuites/{product_suite} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ProductSuite getProductSuite(String name) { + GetProductSuiteRequest request = GetProductSuiteRequest.newBuilder().setName(name).build(); + return getProductSuite(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get details of a ProductSuite. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   ListProductSuitesRequest request =
+   *       ListProductSuitesRequest.newBuilder()
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (ProductSuite element :
+   *       cloudProductRegistryReadServiceClient.listProductSuites(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductSuitesPagedResponse listProductSuites(ListProductSuitesRequest request) { + return listProductSuitesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSuites. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   ListProductSuitesRequest request =
+   *       ListProductSuitesRequest.newBuilder()
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudProductRegistryReadServiceClient
+   *           .listProductSuitesPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (ProductSuite element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductSuitesPagedCallable() { + return stub.listProductSuitesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists ProductSuites. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   ListProductSuitesRequest request =
+   *       ListProductSuitesRequest.newBuilder()
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListProductSuitesResponse response =
+   *         cloudProductRegistryReadServiceClient.listProductSuitesCallable().call(request);
+   *     for (ProductSuite element : response.getProductSuitesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductSuitesCallable() { + return stub.listProductSuitesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a LogicalProduct. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   LogicalProductName name = LogicalProductName.of("[LOGICAL_PRODUCT]");
+   *   LogicalProduct response = cloudProductRegistryReadServiceClient.getLogicalProduct(name);
+   * }
+   * }
+ * + * @param name Required. The name of the LogicalProduct to retrieve. Format: + * logicalProducts/{logical_product} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogicalProduct getLogicalProduct(@Nullable LogicalProductName name) { + GetLogicalProductRequest request = + GetLogicalProductRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getLogicalProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a LogicalProduct. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   String name = LogicalProductName.of("[LOGICAL_PRODUCT]").toString();
+   *   LogicalProduct response = cloudProductRegistryReadServiceClient.getLogicalProduct(name);
+   * }
+   * }
+ * + * @param name Required. The name of the LogicalProduct to retrieve. Format: + * logicalProducts/{logical_product} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogicalProduct getLogicalProduct(String name) { + GetLogicalProductRequest request = GetLogicalProductRequest.newBuilder().setName(name).build(); + return getLogicalProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a LogicalProduct. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   ListLogicalProductsRequest request =
+   *       ListLogicalProductsRequest.newBuilder()
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (LogicalProduct element :
+   *       cloudProductRegistryReadServiceClient.listLogicalProducts(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLogicalProductsPagedResponse listLogicalProducts( + ListLogicalProductsRequest request) { + return listLogicalProductsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists LogicalProducts matching given criteria. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   ListLogicalProductsRequest request =
+   *       ListLogicalProductsRequest.newBuilder()
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudProductRegistryReadServiceClient
+   *           .listLogicalProductsPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (LogicalProduct element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLogicalProductsPagedCallable() { + return stub.listLogicalProductsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists LogicalProducts matching given criteria. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   ListLogicalProductsRequest request =
+   *       ListLogicalProductsRequest.newBuilder()
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLogicalProductsResponse response =
+   *         cloudProductRegistryReadServiceClient.listLogicalProductsCallable().call(request);
+   *     for (LogicalProduct element : response.getLogicalProductsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLogicalProductsCallable() { + return stub.listLogicalProductsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get details of a LogicalProductVariant. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   LogicalProductVariantName name =
+   *       LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]");
+   *   LogicalProductVariant response =
+   *       cloudProductRegistryReadServiceClient.getLogicalProductVariant(name);
+   * }
+   * }
+ * + * @param name Required. The name of the LogicalProductVariant to retrieve. Format: + * logicalProducts/{logical_product}/variants/{variant} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogicalProductVariant getLogicalProductVariant( + @Nullable LogicalProductVariantName name) { + GetLogicalProductVariantRequest request = + GetLogicalProductVariantRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getLogicalProductVariant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get details of a LogicalProductVariant. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   String name = LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]").toString();
+   *   LogicalProductVariant response =
+   *       cloudProductRegistryReadServiceClient.getLogicalProductVariant(name);
+   * }
+   * }
+ * + * @param name Required. The name of the LogicalProductVariant to retrieve. Format: + * logicalProducts/{logical_product}/variants/{variant} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogicalProductVariant getLogicalProductVariant(String name) { + GetLogicalProductVariantRequest request = + GetLogicalProductVariantRequest.newBuilder().setName(name).build(); + return getLogicalProductVariant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get details of a LogicalProductVariant. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   GetLogicalProductVariantRequest request =
+   *       GetLogicalProductVariantRequest.newBuilder()
+   *           .setName(LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]").toString())
+   *           .build();
+   *   LogicalProductVariant response =
+   *       cloudProductRegistryReadServiceClient.getLogicalProductVariant(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 LogicalProductVariant getLogicalProductVariant( + GetLogicalProductVariantRequest request) { + return getLogicalProductVariantCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get details of a LogicalProductVariant. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   LogicalProductName parent = LogicalProductName.of("[LOGICAL_PRODUCT]");
+   *   for (LogicalProductVariant element :
+   *       cloudProductRegistryReadServiceClient.listLogicalProductVariants(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent logical product id. Format: logicalProducts/{logical_product} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLogicalProductVariantsPagedResponse listLogicalProductVariants( + @Nullable LogicalProductName parent) { + ListLogicalProductVariantsRequest request = + ListLogicalProductVariantsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listLogicalProductVariants(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists LogicalProductVariants matching given criteria. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   String parent = LogicalProductName.of("[LOGICAL_PRODUCT]").toString();
+   *   for (LogicalProductVariant element :
+   *       cloudProductRegistryReadServiceClient.listLogicalProductVariants(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent logical product id. Format: logicalProducts/{logical_product} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLogicalProductVariantsPagedResponse listLogicalProductVariants(String parent) { + ListLogicalProductVariantsRequest request = + ListLogicalProductVariantsRequest.newBuilder().setParent(parent).build(); + return listLogicalProductVariants(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists LogicalProductVariants matching given criteria. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   ListLogicalProductVariantsRequest request =
+   *       ListLogicalProductVariantsRequest.newBuilder()
+   *           .setParent(LogicalProductName.of("[LOGICAL_PRODUCT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (LogicalProductVariant element :
+   *       cloudProductRegistryReadServiceClient.listLogicalProductVariants(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLogicalProductVariantsPagedResponse listLogicalProductVariants( + ListLogicalProductVariantsRequest request) { + return listLogicalProductVariantsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists LogicalProductVariants matching given criteria. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   ListLogicalProductVariantsRequest request =
+   *       ListLogicalProductVariantsRequest.newBuilder()
+   *           .setParent(LogicalProductName.of("[LOGICAL_PRODUCT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudProductRegistryReadServiceClient
+   *           .listLogicalProductVariantsPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (LogicalProductVariant element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListLogicalProductVariantsRequest, ListLogicalProductVariantsPagedResponse> + listLogicalProductVariantsPagedCallable() { + return stub.listLogicalProductVariantsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists LogicalProductVariants matching given criteria. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   ListLogicalProductVariantsRequest request =
+   *       ListLogicalProductVariantsRequest.newBuilder()
+   *           .setParent(LogicalProductName.of("[LOGICAL_PRODUCT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLogicalProductVariantsResponse response =
+   *         cloudProductRegistryReadServiceClient
+   *             .listLogicalProductVariantsCallable()
+   *             .call(request);
+   *     for (LogicalProductVariant element : response.getLogicalProductVariantsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLogicalProductVariantsCallable() { + return stub.listLogicalProductVariantsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Look up entities. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   LookupEntityRequest request =
+   *       LookupEntityRequest.newBuilder().setLookupUri("lookupUri1150318994").build();
+   *   LookupEntityResponse response = cloudProductRegistryReadServiceClient.lookupEntity(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 LookupEntityResponse lookupEntity(LookupEntityRequest request) { + return lookupEntityCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Look up entities. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+   *     CloudProductRegistryReadServiceClient.create()) {
+   *   LookupEntityRequest request =
+   *       LookupEntityRequest.newBuilder().setLookupUri("lookupUri1150318994").build();
+   *   ApiFuture future =
+   *       cloudProductRegistryReadServiceClient.lookupEntityCallable().futureCall(request);
+   *   // Do something.
+   *   LookupEntityResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable lookupEntityCallable() { + return stub.lookupEntityCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListProductSuitesPagedResponse + extends AbstractPagedListResponse< + ListProductSuitesRequest, + ListProductSuitesResponse, + ProductSuite, + ListProductSuitesPage, + ListProductSuitesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProductSuitesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListProductSuitesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListProductSuitesPagedResponse(ListProductSuitesPage page) { + super(page, ListProductSuitesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProductSuitesPage + extends AbstractPage< + ListProductSuitesRequest, + ListProductSuitesResponse, + ProductSuite, + ListProductSuitesPage> { + + private ListProductSuitesPage( + @Nullable PageContext + context, + @Nullable ListProductSuitesResponse response) { + super(context, response); + } + + private static ListProductSuitesPage createEmptyPage() { + return new ListProductSuitesPage(null, null); + } + + @Override + protected ListProductSuitesPage createPage( + @Nullable PageContext + context, + @Nullable ListProductSuitesResponse response) { + return new ListProductSuitesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProductSuitesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProductSuitesRequest, + ListProductSuitesResponse, + ProductSuite, + ListProductSuitesPage, + ListProductSuitesFixedSizeCollection> { + + private ListProductSuitesFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProductSuitesFixedSizeCollection createEmptyCollection() { + return new ListProductSuitesFixedSizeCollection(null, 0); + } + + @Override + protected ListProductSuitesFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListProductSuitesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLogicalProductsPagedResponse + extends AbstractPagedListResponse< + ListLogicalProductsRequest, + ListLogicalProductsResponse, + LogicalProduct, + ListLogicalProductsPage, + ListLogicalProductsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLogicalProductsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLogicalProductsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLogicalProductsPagedResponse(ListLogicalProductsPage page) { + super(page, ListLogicalProductsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLogicalProductsPage + extends AbstractPage< + ListLogicalProductsRequest, + ListLogicalProductsResponse, + LogicalProduct, + ListLogicalProductsPage> { + + private ListLogicalProductsPage( + @Nullable + PageContext + context, + @Nullable ListLogicalProductsResponse response) { + super(context, response); + } + + private static ListLogicalProductsPage createEmptyPage() { + return new ListLogicalProductsPage(null, null); + } + + @Override + protected ListLogicalProductsPage createPage( + @Nullable + PageContext + context, + @Nullable ListLogicalProductsResponse response) { + return new ListLogicalProductsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLogicalProductsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLogicalProductsRequest, + ListLogicalProductsResponse, + LogicalProduct, + ListLogicalProductsPage, + ListLogicalProductsFixedSizeCollection> { + + private ListLogicalProductsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLogicalProductsFixedSizeCollection createEmptyCollection() { + return new ListLogicalProductsFixedSizeCollection(null, 0); + } + + @Override + protected ListLogicalProductsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListLogicalProductsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLogicalProductVariantsPagedResponse + extends AbstractPagedListResponse< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + LogicalProductVariant, + ListLogicalProductVariantsPage, + ListLogicalProductVariantsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + LogicalProductVariant> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLogicalProductVariantsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLogicalProductVariantsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLogicalProductVariantsPagedResponse(ListLogicalProductVariantsPage page) { + super(page, ListLogicalProductVariantsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLogicalProductVariantsPage + extends AbstractPage< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + LogicalProductVariant, + ListLogicalProductVariantsPage> { + + private ListLogicalProductVariantsPage( + @Nullable + PageContext< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + LogicalProductVariant> + context, + @Nullable ListLogicalProductVariantsResponse response) { + super(context, response); + } + + private static ListLogicalProductVariantsPage createEmptyPage() { + return new ListLogicalProductVariantsPage(null, null); + } + + @Override + protected ListLogicalProductVariantsPage createPage( + @Nullable + PageContext< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + LogicalProductVariant> + context, + @Nullable ListLogicalProductVariantsResponse response) { + return new ListLogicalProductVariantsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable + PageContext< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + LogicalProductVariant> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLogicalProductVariantsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + LogicalProductVariant, + ListLogicalProductVariantsPage, + ListLogicalProductVariantsFixedSizeCollection> { + + private ListLogicalProductVariantsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLogicalProductVariantsFixedSizeCollection createEmptyCollection() { + return new ListLogicalProductVariantsFixedSizeCollection(null, 0); + } + + @Override + protected ListLogicalProductVariantsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListLogicalProductVariantsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceSettings.java b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceSettings.java new file mode 100644 index 000000000000..da23d6448722 --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceSettings.java @@ -0,0 +1,316 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1; + +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListLogicalProductVariantsPagedResponse; +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListLogicalProductsPagedResponse; +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListProductSuitesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.productregistry.v1.stub.CloudProductRegistryReadServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link CloudProductRegistryReadServiceClient}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudProductRegistryReadServiceSettings.Builder cloudProductRegistryReadServiceSettingsBuilder =
+ *     CloudProductRegistryReadServiceSettings.newBuilder();
+ * cloudProductRegistryReadServiceSettingsBuilder
+ *     .getProductSuiteSettings()
+ *     .setRetrySettings(
+ *         cloudProductRegistryReadServiceSettingsBuilder
+ *             .getProductSuiteSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * CloudProductRegistryReadServiceSettings cloudProductRegistryReadServiceSettings =
+ *     cloudProductRegistryReadServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class CloudProductRegistryReadServiceSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to getProductSuite. */ + public UnaryCallSettings getProductSuiteSettings() { + return ((CloudProductRegistryReadServiceStubSettings) getStubSettings()) + .getProductSuiteSettings(); + } + + /** Returns the object with the settings used for calls to listProductSuites. */ + public PagedCallSettings< + ListProductSuitesRequest, ListProductSuitesResponse, ListProductSuitesPagedResponse> + listProductSuitesSettings() { + return ((CloudProductRegistryReadServiceStubSettings) getStubSettings()) + .listProductSuitesSettings(); + } + + /** Returns the object with the settings used for calls to getLogicalProduct. */ + public UnaryCallSettings getLogicalProductSettings() { + return ((CloudProductRegistryReadServiceStubSettings) getStubSettings()) + .getLogicalProductSettings(); + } + + /** Returns the object with the settings used for calls to listLogicalProducts. */ + public PagedCallSettings< + ListLogicalProductsRequest, ListLogicalProductsResponse, ListLogicalProductsPagedResponse> + listLogicalProductsSettings() { + return ((CloudProductRegistryReadServiceStubSettings) getStubSettings()) + .listLogicalProductsSettings(); + } + + /** Returns the object with the settings used for calls to getLogicalProductVariant. */ + public UnaryCallSettings + getLogicalProductVariantSettings() { + return ((CloudProductRegistryReadServiceStubSettings) getStubSettings()) + .getLogicalProductVariantSettings(); + } + + /** Returns the object with the settings used for calls to listLogicalProductVariants. */ + public PagedCallSettings< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + ListLogicalProductVariantsPagedResponse> + listLogicalProductVariantsSettings() { + return ((CloudProductRegistryReadServiceStubSettings) getStubSettings()) + .listLogicalProductVariantsSettings(); + } + + /** Returns the object with the settings used for calls to lookupEntity. */ + public UnaryCallSettings lookupEntitySettings() { + return ((CloudProductRegistryReadServiceStubSettings) getStubSettings()).lookupEntitySettings(); + } + + public static final CloudProductRegistryReadServiceSettings create( + CloudProductRegistryReadServiceStubSettings stub) throws IOException { + return new CloudProductRegistryReadServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return CloudProductRegistryReadServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return CloudProductRegistryReadServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return CloudProductRegistryReadServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return CloudProductRegistryReadServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return CloudProductRegistryReadServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return CloudProductRegistryReadServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return CloudProductRegistryReadServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CloudProductRegistryReadServiceStubSettings.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(@Nullable 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 CloudProductRegistryReadServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for CloudProductRegistryReadServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(@Nullable ClientContext clientContext) { + super(CloudProductRegistryReadServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(CloudProductRegistryReadServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(CloudProductRegistryReadServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(CloudProductRegistryReadServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(CloudProductRegistryReadServiceStubSettings.newHttpJsonBuilder()); + } + + public CloudProductRegistryReadServiceStubSettings.Builder getStubSettingsBuilder() { + return ((CloudProductRegistryReadServiceStubSettings.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 getProductSuite. */ + public UnaryCallSettings.Builder + getProductSuiteSettings() { + return getStubSettingsBuilder().getProductSuiteSettings(); + } + + /** Returns the builder for the settings used for calls to listProductSuites. */ + public PagedCallSettings.Builder< + ListProductSuitesRequest, ListProductSuitesResponse, ListProductSuitesPagedResponse> + listProductSuitesSettings() { + return getStubSettingsBuilder().listProductSuitesSettings(); + } + + /** Returns the builder for the settings used for calls to getLogicalProduct. */ + public UnaryCallSettings.Builder + getLogicalProductSettings() { + return getStubSettingsBuilder().getLogicalProductSettings(); + } + + /** Returns the builder for the settings used for calls to listLogicalProducts. */ + public PagedCallSettings.Builder< + ListLogicalProductsRequest, + ListLogicalProductsResponse, + ListLogicalProductsPagedResponse> + listLogicalProductsSettings() { + return getStubSettingsBuilder().listLogicalProductsSettings(); + } + + /** Returns the builder for the settings used for calls to getLogicalProductVariant. */ + public UnaryCallSettings.Builder + getLogicalProductVariantSettings() { + return getStubSettingsBuilder().getLogicalProductVariantSettings(); + } + + /** Returns the builder for the settings used for calls to listLogicalProductVariants. */ + public PagedCallSettings.Builder< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + ListLogicalProductVariantsPagedResponse> + listLogicalProductVariantsSettings() { + return getStubSettingsBuilder().listLogicalProductVariantsSettings(); + } + + /** Returns the builder for the settings used for calls to lookupEntity. */ + public UnaryCallSettings.Builder + lookupEntitySettings() { + return getStubSettingsBuilder().lookupEntitySettings(); + } + + @Override + public CloudProductRegistryReadServiceSettings build() throws IOException { + return new CloudProductRegistryReadServiceSettings(this); + } + } +} diff --git a/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/gapic_metadata.json b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/gapic_metadata.json new file mode 100644 index 000000000000..cc85e7e1cc77 --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/gapic_metadata.json @@ -0,0 +1,39 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.productregistry.v1", + "libraryPackage": "com.google.cloud.productregistry.v1", + "services": { + "CloudProductRegistryReadService": { + "clients": { + "grpc": { + "libraryClient": "CloudProductRegistryReadServiceClient", + "rpcs": { + "GetLogicalProduct": { + "methods": ["getLogicalProduct", "getLogicalProduct", "getLogicalProduct", "getLogicalProductCallable"] + }, + "GetLogicalProductVariant": { + "methods": ["getLogicalProductVariant", "getLogicalProductVariant", "getLogicalProductVariant", "getLogicalProductVariantCallable"] + }, + "GetProductSuite": { + "methods": ["getProductSuite", "getProductSuite", "getProductSuite", "getProductSuiteCallable"] + }, + "ListLogicalProductVariants": { + "methods": ["listLogicalProductVariants", "listLogicalProductVariants", "listLogicalProductVariants", "listLogicalProductVariantsPagedCallable", "listLogicalProductVariantsCallable"] + }, + "ListLogicalProducts": { + "methods": ["listLogicalProducts", "listLogicalProductsPagedCallable", "listLogicalProductsCallable"] + }, + "ListProductSuites": { + "methods": ["listProductSuites", "listProductSuitesPagedCallable", "listProductSuitesCallable"] + }, + "LookupEntity": { + "methods": ["lookupEntity", "lookupEntityCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/package-info.java b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/package-info.java new file mode 100644 index 000000000000..41eac50269ea --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/package-info.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Cloud Product Registry API + * + *

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

======================= CloudProductRegistryReadServiceClient ======================= + * + *

Service Description: Cloud Product Registry Read Service provides capabilities to access all + * first and third party Google Cloud products. + * + *

Sample for CloudProductRegistryReadServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient =
+ *     CloudProductRegistryReadServiceClient.create()) {
+ *   ProductSuiteName name = ProductSuiteName.of("[PRODUCT_SUITE]");
+ *   ProductSuite response = cloudProductRegistryReadServiceClient.getProductSuite(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.productregistry.v1; + +import javax.annotation.Generated; diff --git a/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/CloudProductRegistryReadServiceStub.java b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/CloudProductRegistryReadServiceStub.java new file mode 100644 index 000000000000..574d9576e2e5 --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/CloudProductRegistryReadServiceStub.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.stub; + +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListLogicalProductVariantsPagedResponse; +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListLogicalProductsPagedResponse; +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListProductSuitesPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.productregistry.v1.GetLogicalProductRequest; +import com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest; +import com.google.cloud.productregistry.v1.GetProductSuiteRequest; +import com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest; +import com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse; +import com.google.cloud.productregistry.v1.ListLogicalProductsRequest; +import com.google.cloud.productregistry.v1.ListLogicalProductsResponse; +import com.google.cloud.productregistry.v1.ListProductSuitesRequest; +import com.google.cloud.productregistry.v1.ListProductSuitesResponse; +import com.google.cloud.productregistry.v1.LogicalProduct; +import com.google.cloud.productregistry.v1.LogicalProductVariant; +import com.google.cloud.productregistry.v1.LookupEntityRequest; +import com.google.cloud.productregistry.v1.LookupEntityResponse; +import com.google.cloud.productregistry.v1.ProductSuite; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the CloudProductRegistryReadService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@NullMarked +@Generated("by gapic-generator-java") +public abstract class CloudProductRegistryReadServiceStub implements BackgroundResource { + + public UnaryCallable getProductSuiteCallable() { + throw new UnsupportedOperationException("Not implemented: getProductSuiteCallable()"); + } + + public UnaryCallable + listProductSuitesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listProductSuitesPagedCallable()"); + } + + public UnaryCallable + listProductSuitesCallable() { + throw new UnsupportedOperationException("Not implemented: listProductSuitesCallable()"); + } + + public UnaryCallable getLogicalProductCallable() { + throw new UnsupportedOperationException("Not implemented: getLogicalProductCallable()"); + } + + public UnaryCallable + listLogicalProductsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLogicalProductsPagedCallable()"); + } + + public UnaryCallable + listLogicalProductsCallable() { + throw new UnsupportedOperationException("Not implemented: listLogicalProductsCallable()"); + } + + public UnaryCallable + getLogicalProductVariantCallable() { + throw new UnsupportedOperationException("Not implemented: getLogicalProductVariantCallable()"); + } + + public UnaryCallable + listLogicalProductVariantsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listLogicalProductVariantsPagedCallable()"); + } + + public UnaryCallable + listLogicalProductVariantsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listLogicalProductVariantsCallable()"); + } + + public UnaryCallable lookupEntityCallable() { + throw new UnsupportedOperationException("Not implemented: lookupEntityCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/CloudProductRegistryReadServiceStubSettings.java b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/CloudProductRegistryReadServiceStubSettings.java new file mode 100644 index 000000000000..32eff721c45a --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/CloudProductRegistryReadServiceStubSettings.java @@ -0,0 +1,764 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.stub; + +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListLogicalProductVariantsPagedResponse; +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListLogicalProductsPagedResponse; +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListProductSuitesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.productregistry.v1.GetLogicalProductRequest; +import com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest; +import com.google.cloud.productregistry.v1.GetProductSuiteRequest; +import com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest; +import com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse; +import com.google.cloud.productregistry.v1.ListLogicalProductsRequest; +import com.google.cloud.productregistry.v1.ListLogicalProductsResponse; +import com.google.cloud.productregistry.v1.ListProductSuitesRequest; +import com.google.cloud.productregistry.v1.ListProductSuitesResponse; +import com.google.cloud.productregistry.v1.LogicalProduct; +import com.google.cloud.productregistry.v1.LogicalProductVariant; +import com.google.cloud.productregistry.v1.LookupEntityRequest; +import com.google.cloud.productregistry.v1.LookupEntityResponse; +import com.google.cloud.productregistry.v1.ProductSuite; +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.time.Duration; +import java.util.List; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link CloudProductRegistryReadServiceStub}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudProductRegistryReadServiceStubSettings.Builder
+ *     cloudProductRegistryReadServiceSettingsBuilder =
+ *         CloudProductRegistryReadServiceStubSettings.newBuilder();
+ * cloudProductRegistryReadServiceSettingsBuilder
+ *     .getProductSuiteSettings()
+ *     .setRetrySettings(
+ *         cloudProductRegistryReadServiceSettingsBuilder
+ *             .getProductSuiteSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * CloudProductRegistryReadServiceStubSettings cloudProductRegistryReadServiceSettings =
+ *     cloudProductRegistryReadServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@NullMarked +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class CloudProductRegistryReadServiceStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().build(); + + private final UnaryCallSettings getProductSuiteSettings; + private final PagedCallSettings< + ListProductSuitesRequest, ListProductSuitesResponse, ListProductSuitesPagedResponse> + listProductSuitesSettings; + private final UnaryCallSettings + getLogicalProductSettings; + private final PagedCallSettings< + ListLogicalProductsRequest, ListLogicalProductsResponse, ListLogicalProductsPagedResponse> + listLogicalProductsSettings; + private final UnaryCallSettings + getLogicalProductVariantSettings; + private final PagedCallSettings< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + ListLogicalProductVariantsPagedResponse> + listLogicalProductVariantsSettings; + private final UnaryCallSettings lookupEntitySettings; + + private static final PagedListDescriptor< + ListProductSuitesRequest, ListProductSuitesResponse, ProductSuite> + LIST_PRODUCT_SUITES_PAGE_STR_DESC = + new PagedListDescriptor< + ListProductSuitesRequest, ListProductSuitesResponse, ProductSuite>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListProductSuitesRequest injectToken( + ListProductSuitesRequest payload, String token) { + return ListProductSuitesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListProductSuitesRequest injectPageSize( + ListProductSuitesRequest payload, int pageSize) { + return ListProductSuitesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListProductSuitesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListProductSuitesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListProductSuitesResponse payload) { + return payload.getProductSuitesList(); + } + }; + + private static final PagedListDescriptor< + ListLogicalProductsRequest, ListLogicalProductsResponse, LogicalProduct> + LIST_LOGICAL_PRODUCTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListLogicalProductsRequest, ListLogicalProductsResponse, LogicalProduct>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLogicalProductsRequest injectToken( + ListLogicalProductsRequest payload, String token) { + return ListLogicalProductsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLogicalProductsRequest injectPageSize( + ListLogicalProductsRequest payload, int pageSize) { + return ListLogicalProductsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLogicalProductsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLogicalProductsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLogicalProductsResponse payload) { + return payload.getLogicalProductsList(); + } + }; + + private static final PagedListDescriptor< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + LogicalProductVariant> + LIST_LOGICAL_PRODUCT_VARIANTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + LogicalProductVariant>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLogicalProductVariantsRequest injectToken( + ListLogicalProductVariantsRequest payload, String token) { + return ListLogicalProductVariantsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListLogicalProductVariantsRequest injectPageSize( + ListLogicalProductVariantsRequest payload, int pageSize) { + return ListLogicalProductVariantsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListLogicalProductVariantsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLogicalProductVariantsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListLogicalProductVariantsResponse payload) { + return payload.getLogicalProductVariantsList(); + } + }; + + private static final PagedListResponseFactory< + ListProductSuitesRequest, ListProductSuitesResponse, ListProductSuitesPagedResponse> + LIST_PRODUCT_SUITES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProductSuitesRequest, + ListProductSuitesResponse, + ListProductSuitesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListProductSuitesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_PRODUCT_SUITES_PAGE_STR_DESC, request, context); + return ListProductSuitesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLogicalProductsRequest, ListLogicalProductsResponse, ListLogicalProductsPagedResponse> + LIST_LOGICAL_PRODUCTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLogicalProductsRequest, + ListLogicalProductsResponse, + ListLogicalProductsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLogicalProductsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_LOGICAL_PRODUCTS_PAGE_STR_DESC, request, context); + return ListLogicalProductsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + ListLogicalProductVariantsPagedResponse> + LIST_LOGICAL_PRODUCT_VARIANTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + ListLogicalProductVariantsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListLogicalProductVariantsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + LogicalProductVariant> + pageContext = + PageContext.create( + callable, LIST_LOGICAL_PRODUCT_VARIANTS_PAGE_STR_DESC, request, context); + return ListLogicalProductVariantsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to getProductSuite. */ + public UnaryCallSettings getProductSuiteSettings() { + return getProductSuiteSettings; + } + + /** Returns the object with the settings used for calls to listProductSuites. */ + public PagedCallSettings< + ListProductSuitesRequest, ListProductSuitesResponse, ListProductSuitesPagedResponse> + listProductSuitesSettings() { + return listProductSuitesSettings; + } + + /** Returns the object with the settings used for calls to getLogicalProduct. */ + public UnaryCallSettings getLogicalProductSettings() { + return getLogicalProductSettings; + } + + /** Returns the object with the settings used for calls to listLogicalProducts. */ + public PagedCallSettings< + ListLogicalProductsRequest, ListLogicalProductsResponse, ListLogicalProductsPagedResponse> + listLogicalProductsSettings() { + return listLogicalProductsSettings; + } + + /** Returns the object with the settings used for calls to getLogicalProductVariant. */ + public UnaryCallSettings + getLogicalProductVariantSettings() { + return getLogicalProductVariantSettings; + } + + /** Returns the object with the settings used for calls to listLogicalProductVariants. */ + public PagedCallSettings< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + ListLogicalProductVariantsPagedResponse> + listLogicalProductVariantsSettings() { + return listLogicalProductVariantsSettings; + } + + /** Returns the object with the settings used for calls to lookupEntity. */ + public UnaryCallSettings lookupEntitySettings() { + return lookupEntitySettings; + } + + public CloudProductRegistryReadServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcCloudProductRegistryReadServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonCloudProductRegistryReadServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "cloudproductregistry"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "cloudproductregistry.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "cloudproductregistry.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(CloudProductRegistryReadServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", + GaxProperties.getLibraryVersion(CloudProductRegistryReadServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CloudProductRegistryReadServiceStubSettings.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(@Nullable 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 CloudProductRegistryReadServiceStubSettings(Builder settingsBuilder) + throws IOException { + super(settingsBuilder); + + getProductSuiteSettings = settingsBuilder.getProductSuiteSettings().build(); + listProductSuitesSettings = settingsBuilder.listProductSuitesSettings().build(); + getLogicalProductSettings = settingsBuilder.getLogicalProductSettings().build(); + listLogicalProductsSettings = settingsBuilder.listLogicalProductsSettings().build(); + getLogicalProductVariantSettings = settingsBuilder.getLogicalProductVariantSettings().build(); + listLogicalProductVariantsSettings = + settingsBuilder.listLogicalProductVariantsSettings().build(); + lookupEntitySettings = settingsBuilder.lookupEntitySettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-productregistry") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for CloudProductRegistryReadServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + getProductSuiteSettings; + private final PagedCallSettings.Builder< + ListProductSuitesRequest, ListProductSuitesResponse, ListProductSuitesPagedResponse> + listProductSuitesSettings; + private final UnaryCallSettings.Builder + getLogicalProductSettings; + private final PagedCallSettings.Builder< + ListLogicalProductsRequest, + ListLogicalProductsResponse, + ListLogicalProductsPagedResponse> + listLogicalProductsSettings; + private final UnaryCallSettings.Builder + getLogicalProductVariantSettings; + private final PagedCallSettings.Builder< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + ListLogicalProductVariantsPagedResponse> + listLogicalProductVariantsSettings; + private final UnaryCallSettings.Builder + lookupEntitySettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(@Nullable ClientContext clientContext) { + super(clientContext); + + getProductSuiteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listProductSuitesSettings = PagedCallSettings.newBuilder(LIST_PRODUCT_SUITES_PAGE_STR_FACT); + getLogicalProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLogicalProductsSettings = + PagedCallSettings.newBuilder(LIST_LOGICAL_PRODUCTS_PAGE_STR_FACT); + getLogicalProductVariantSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLogicalProductVariantsSettings = + PagedCallSettings.newBuilder(LIST_LOGICAL_PRODUCT_VARIANTS_PAGE_STR_FACT); + lookupEntitySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getProductSuiteSettings, + listProductSuitesSettings, + getLogicalProductSettings, + listLogicalProductsSettings, + getLogicalProductVariantSettings, + listLogicalProductVariantsSettings, + lookupEntitySettings); + initDefaults(this); + } + + protected Builder(CloudProductRegistryReadServiceStubSettings settings) { + super(settings); + + getProductSuiteSettings = settings.getProductSuiteSettings.toBuilder(); + listProductSuitesSettings = settings.listProductSuitesSettings.toBuilder(); + getLogicalProductSettings = settings.getLogicalProductSettings.toBuilder(); + listLogicalProductsSettings = settings.listLogicalProductsSettings.toBuilder(); + getLogicalProductVariantSettings = settings.getLogicalProductVariantSettings.toBuilder(); + listLogicalProductVariantsSettings = settings.listLogicalProductVariantsSettings.toBuilder(); + lookupEntitySettings = settings.lookupEntitySettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getProductSuiteSettings, + listProductSuitesSettings, + getLogicalProductSettings, + listLogicalProductsSettings, + getLogicalProductVariantSettings, + listLogicalProductVariantsSettings, + lookupEntitySettings); + } + + 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 + .getProductSuiteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listProductSuitesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLogicalProductSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listLogicalProductsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLogicalProductVariantSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listLogicalProductVariantsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .lookupEntitySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_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 getProductSuite. */ + public UnaryCallSettings.Builder + getProductSuiteSettings() { + return getProductSuiteSettings; + } + + /** Returns the builder for the settings used for calls to listProductSuites. */ + public PagedCallSettings.Builder< + ListProductSuitesRequest, ListProductSuitesResponse, ListProductSuitesPagedResponse> + listProductSuitesSettings() { + return listProductSuitesSettings; + } + + /** Returns the builder for the settings used for calls to getLogicalProduct. */ + public UnaryCallSettings.Builder + getLogicalProductSettings() { + return getLogicalProductSettings; + } + + /** Returns the builder for the settings used for calls to listLogicalProducts. */ + public PagedCallSettings.Builder< + ListLogicalProductsRequest, + ListLogicalProductsResponse, + ListLogicalProductsPagedResponse> + listLogicalProductsSettings() { + return listLogicalProductsSettings; + } + + /** Returns the builder for the settings used for calls to getLogicalProductVariant. */ + public UnaryCallSettings.Builder + getLogicalProductVariantSettings() { + return getLogicalProductVariantSettings; + } + + /** Returns the builder for the settings used for calls to listLogicalProductVariants. */ + public PagedCallSettings.Builder< + ListLogicalProductVariantsRequest, + ListLogicalProductVariantsResponse, + ListLogicalProductVariantsPagedResponse> + listLogicalProductVariantsSettings() { + return listLogicalProductVariantsSettings; + } + + /** Returns the builder for the settings used for calls to lookupEntity. */ + public UnaryCallSettings.Builder + lookupEntitySettings() { + return lookupEntitySettings; + } + + @Override + public CloudProductRegistryReadServiceStubSettings build() throws IOException { + return new CloudProductRegistryReadServiceStubSettings(this); + } + } +} diff --git a/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/GrpcCloudProductRegistryReadServiceCallableFactory.java b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/GrpcCloudProductRegistryReadServiceCallableFactory.java new file mode 100644 index 000000000000..a07b87a324c2 --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/GrpcCloudProductRegistryReadServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.stub; + +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; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the CloudProductRegistryReadService service API. + * + *

This class is for advanced usage. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class GrpcCloudProductRegistryReadServiceCallableFactory 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-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/GrpcCloudProductRegistryReadServiceStub.java b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/GrpcCloudProductRegistryReadServiceStub.java new file mode 100644 index 000000000000..8655d278f643 --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/GrpcCloudProductRegistryReadServiceStub.java @@ -0,0 +1,432 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.stub; + +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListLogicalProductVariantsPagedResponse; +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListLogicalProductsPagedResponse; +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListProductSuitesPagedResponse; + +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.productregistry.v1.GetLogicalProductRequest; +import com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest; +import com.google.cloud.productregistry.v1.GetProductSuiteRequest; +import com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest; +import com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse; +import com.google.cloud.productregistry.v1.ListLogicalProductsRequest; +import com.google.cloud.productregistry.v1.ListLogicalProductsResponse; +import com.google.cloud.productregistry.v1.ListProductSuitesRequest; +import com.google.cloud.productregistry.v1.ListProductSuitesResponse; +import com.google.cloud.productregistry.v1.LogicalProduct; +import com.google.cloud.productregistry.v1.LogicalProductVariant; +import com.google.cloud.productregistry.v1.LookupEntityRequest; +import com.google.cloud.productregistry.v1.LookupEntityResponse; +import com.google.cloud.productregistry.v1.ProductSuite; +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; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the CloudProductRegistryReadService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class GrpcCloudProductRegistryReadServiceStub extends CloudProductRegistryReadServiceStub { + private static final MethodDescriptor + getProductSuiteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.productregistry.v1.CloudProductRegistryReadService/GetProductSuite") + .setRequestMarshaller( + ProtoUtils.marshaller(GetProductSuiteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ProductSuite.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listProductSuitesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.productregistry.v1.CloudProductRegistryReadService/ListProductSuites") + .setRequestMarshaller( + ProtoUtils.marshaller(ListProductSuitesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListProductSuitesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getLogicalProductMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.productregistry.v1.CloudProductRegistryReadService/GetLogicalProduct") + .setRequestMarshaller( + ProtoUtils.marshaller(GetLogicalProductRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(LogicalProduct.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listLogicalProductsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.productregistry.v1.CloudProductRegistryReadService/ListLogicalProducts") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLogicalProductsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLogicalProductsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getLogicalProductVariantMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.productregistry.v1.CloudProductRegistryReadService/GetLogicalProductVariant") + .setRequestMarshaller( + ProtoUtils.marshaller(GetLogicalProductVariantRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(LogicalProductVariant.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListLogicalProductVariantsRequest, ListLogicalProductVariantsResponse> + listLogicalProductVariantsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.productregistry.v1.CloudProductRegistryReadService/ListLogicalProductVariants") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLogicalProductVariantsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLogicalProductVariantsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + lookupEntityMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.productregistry.v1.CloudProductRegistryReadService/LookupEntity") + .setRequestMarshaller(ProtoUtils.marshaller(LookupEntityRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(LookupEntityResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable getProductSuiteCallable; + private final UnaryCallable + listProductSuitesCallable; + private final UnaryCallable + listProductSuitesPagedCallable; + private final UnaryCallable getLogicalProductCallable; + private final UnaryCallable + listLogicalProductsCallable; + private final UnaryCallable + listLogicalProductsPagedCallable; + private final UnaryCallable + getLogicalProductVariantCallable; + private final UnaryCallable + listLogicalProductVariantsCallable; + private final UnaryCallable< + ListLogicalProductVariantsRequest, ListLogicalProductVariantsPagedResponse> + listLogicalProductVariantsPagedCallable; + private final UnaryCallable lookupEntityCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcCloudProductRegistryReadServiceStub create( + CloudProductRegistryReadServiceStubSettings settings) throws IOException { + return new GrpcCloudProductRegistryReadServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcCloudProductRegistryReadServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcCloudProductRegistryReadServiceStub( + CloudProductRegistryReadServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcCloudProductRegistryReadServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcCloudProductRegistryReadServiceStub( + CloudProductRegistryReadServiceStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcCloudProductRegistryReadServiceStub, 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 GrpcCloudProductRegistryReadServiceStub( + CloudProductRegistryReadServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcCloudProductRegistryReadServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcCloudProductRegistryReadServiceStub, 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 GrpcCloudProductRegistryReadServiceStub( + CloudProductRegistryReadServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings getProductSuiteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getProductSuiteMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listProductSuitesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listProductSuitesMethodDescriptor) + .build(); + GrpcCallSettings getLogicalProductTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLogicalProductMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listLogicalProductsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLogicalProductsMethodDescriptor) + .build(); + GrpcCallSettings + getLogicalProductVariantTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLogicalProductVariantMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listLogicalProductVariantsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listLogicalProductVariantsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings lookupEntityTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(lookupEntityMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("lookup_uri", String.valueOf(request.getLookupUri())); + return builder.build(); + }) + .build(); + + this.getProductSuiteCallable = + callableFactory.createUnaryCallable( + getProductSuiteTransportSettings, settings.getProductSuiteSettings(), clientContext); + this.listProductSuitesCallable = + callableFactory.createUnaryCallable( + listProductSuitesTransportSettings, + settings.listProductSuitesSettings(), + clientContext); + this.listProductSuitesPagedCallable = + callableFactory.createPagedCallable( + listProductSuitesTransportSettings, + settings.listProductSuitesSettings(), + clientContext); + this.getLogicalProductCallable = + callableFactory.createUnaryCallable( + getLogicalProductTransportSettings, + settings.getLogicalProductSettings(), + clientContext); + this.listLogicalProductsCallable = + callableFactory.createUnaryCallable( + listLogicalProductsTransportSettings, + settings.listLogicalProductsSettings(), + clientContext); + this.listLogicalProductsPagedCallable = + callableFactory.createPagedCallable( + listLogicalProductsTransportSettings, + settings.listLogicalProductsSettings(), + clientContext); + this.getLogicalProductVariantCallable = + callableFactory.createUnaryCallable( + getLogicalProductVariantTransportSettings, + settings.getLogicalProductVariantSettings(), + clientContext); + this.listLogicalProductVariantsCallable = + callableFactory.createUnaryCallable( + listLogicalProductVariantsTransportSettings, + settings.listLogicalProductVariantsSettings(), + clientContext); + this.listLogicalProductVariantsPagedCallable = + callableFactory.createPagedCallable( + listLogicalProductVariantsTransportSettings, + settings.listLogicalProductVariantsSettings(), + clientContext); + this.lookupEntityCallable = + callableFactory.createUnaryCallable( + lookupEntityTransportSettings, settings.lookupEntitySettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable getProductSuiteCallable() { + return getProductSuiteCallable; + } + + @Override + public UnaryCallable + listProductSuitesCallable() { + return listProductSuitesCallable; + } + + @Override + public UnaryCallable + listProductSuitesPagedCallable() { + return listProductSuitesPagedCallable; + } + + @Override + public UnaryCallable getLogicalProductCallable() { + return getLogicalProductCallable; + } + + @Override + public UnaryCallable + listLogicalProductsCallable() { + return listLogicalProductsCallable; + } + + @Override + public UnaryCallable + listLogicalProductsPagedCallable() { + return listLogicalProductsPagedCallable; + } + + @Override + public UnaryCallable + getLogicalProductVariantCallable() { + return getLogicalProductVariantCallable; + } + + @Override + public UnaryCallable + listLogicalProductVariantsCallable() { + return listLogicalProductVariantsCallable; + } + + @Override + public UnaryCallable + listLogicalProductVariantsPagedCallable() { + return listLogicalProductVariantsPagedCallable; + } + + @Override + public UnaryCallable lookupEntityCallable() { + return lookupEntityCallable; + } + + @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-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/HttpJsonCloudProductRegistryReadServiceCallableFactory.java b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/HttpJsonCloudProductRegistryReadServiceCallableFactory.java new file mode 100644 index 000000000000..19fba9c6e240 --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/HttpJsonCloudProductRegistryReadServiceCallableFactory.java @@ -0,0 +1,103 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.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; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the CloudProductRegistryReadService service API. + * + *

This class is for advanced usage. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class HttpJsonCloudProductRegistryReadServiceCallableFactory + 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-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/HttpJsonCloudProductRegistryReadServiceStub.java b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/HttpJsonCloudProductRegistryReadServiceStub.java new file mode 100644 index 000000000000..c31465ce8099 --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/HttpJsonCloudProductRegistryReadServiceStub.java @@ -0,0 +1,625 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.stub; + +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListLogicalProductVariantsPagedResponse; +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListLogicalProductsPagedResponse; +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListProductSuitesPagedResponse; + +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.productregistry.v1.GetLogicalProductRequest; +import com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest; +import com.google.cloud.productregistry.v1.GetProductSuiteRequest; +import com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest; +import com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse; +import com.google.cloud.productregistry.v1.ListLogicalProductsRequest; +import com.google.cloud.productregistry.v1.ListLogicalProductsResponse; +import com.google.cloud.productregistry.v1.ListProductSuitesRequest; +import com.google.cloud.productregistry.v1.ListProductSuitesResponse; +import com.google.cloud.productregistry.v1.LogicalProduct; +import com.google.cloud.productregistry.v1.LogicalProductVariant; +import com.google.cloud.productregistry.v1.LookupEntityRequest; +import com.google.cloud.productregistry.v1.LookupEntityResponse; +import com.google.cloud.productregistry.v1.ProductSuite; +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; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the CloudProductRegistryReadService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class HttpJsonCloudProductRegistryReadServiceStub + extends CloudProductRegistryReadServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + getProductSuiteMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.productregistry.v1.CloudProductRegistryReadService/GetProductSuite") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=productSuites/*}", + 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(ProductSuite.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listProductSuitesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.productregistry.v1.CloudProductRegistryReadService/ListProductSuites") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/productSuites", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListProductSuitesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLogicalProductMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.productregistry.v1.CloudProductRegistryReadService/GetLogicalProduct") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=logicalProducts/*}", + 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(LogicalProduct.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLogicalProductsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.productregistry.v1.CloudProductRegistryReadService/ListLogicalProducts") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/logicalProducts", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + 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(ListLogicalProductsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLogicalProductVariantMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.productregistry.v1.CloudProductRegistryReadService/GetLogicalProductVariant") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=logicalProducts/*/variants/*}", + 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(LogicalProductVariant.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListLogicalProductVariantsRequest, ListLogicalProductVariantsResponse> + listLogicalProductVariantsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.productregistry.v1.CloudProductRegistryReadService/ListLogicalProductVariants") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=logicalProducts/*}/variants", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLogicalProductVariantsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + lookupEntityMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.productregistry.v1.CloudProductRegistryReadService/LookupEntity") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{lookupUri=logicalProducts/*}:lookupEntity", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "lookupUri", request.getLookupUri()); + return fields; + }) + .setAdditionalPaths( + "/v1/{lookupUri=logicalProducts/*/variants/*}:lookupEntity", + "/v1/{lookupUri=productSuites/*}:lookupEntity") + .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(LookupEntityResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable getProductSuiteCallable; + private final UnaryCallable + listProductSuitesCallable; + private final UnaryCallable + listProductSuitesPagedCallable; + private final UnaryCallable getLogicalProductCallable; + private final UnaryCallable + listLogicalProductsCallable; + private final UnaryCallable + listLogicalProductsPagedCallable; + private final UnaryCallable + getLogicalProductVariantCallable; + private final UnaryCallable + listLogicalProductVariantsCallable; + private final UnaryCallable< + ListLogicalProductVariantsRequest, ListLogicalProductVariantsPagedResponse> + listLogicalProductVariantsPagedCallable; + private final UnaryCallable lookupEntityCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonCloudProductRegistryReadServiceStub create( + CloudProductRegistryReadServiceStubSettings settings) throws IOException { + return new HttpJsonCloudProductRegistryReadServiceStub( + settings, ClientContext.create(settings)); + } + + public static final HttpJsonCloudProductRegistryReadServiceStub create( + ClientContext clientContext) throws IOException { + return new HttpJsonCloudProductRegistryReadServiceStub( + CloudProductRegistryReadServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonCloudProductRegistryReadServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonCloudProductRegistryReadServiceStub( + CloudProductRegistryReadServiceStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonCloudProductRegistryReadServiceStub, 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 HttpJsonCloudProductRegistryReadServiceStub( + CloudProductRegistryReadServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonCloudProductRegistryReadServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonCloudProductRegistryReadServiceStub, 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 HttpJsonCloudProductRegistryReadServiceStub( + CloudProductRegistryReadServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings getProductSuiteTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getProductSuiteMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listProductSuitesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listProductSuitesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getLogicalProductTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLogicalProductMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listLogicalProductsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listLogicalProductsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getLogicalProductVariantTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(getLogicalProductVariantMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listLogicalProductVariantsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listLogicalProductVariantsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings lookupEntityTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(lookupEntityMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("lookup_uri", String.valueOf(request.getLookupUri())); + return builder.build(); + }) + .build(); + + this.getProductSuiteCallable = + callableFactory.createUnaryCallable( + getProductSuiteTransportSettings, settings.getProductSuiteSettings(), clientContext); + this.listProductSuitesCallable = + callableFactory.createUnaryCallable( + listProductSuitesTransportSettings, + settings.listProductSuitesSettings(), + clientContext); + this.listProductSuitesPagedCallable = + callableFactory.createPagedCallable( + listProductSuitesTransportSettings, + settings.listProductSuitesSettings(), + clientContext); + this.getLogicalProductCallable = + callableFactory.createUnaryCallable( + getLogicalProductTransportSettings, + settings.getLogicalProductSettings(), + clientContext); + this.listLogicalProductsCallable = + callableFactory.createUnaryCallable( + listLogicalProductsTransportSettings, + settings.listLogicalProductsSettings(), + clientContext); + this.listLogicalProductsPagedCallable = + callableFactory.createPagedCallable( + listLogicalProductsTransportSettings, + settings.listLogicalProductsSettings(), + clientContext); + this.getLogicalProductVariantCallable = + callableFactory.createUnaryCallable( + getLogicalProductVariantTransportSettings, + settings.getLogicalProductVariantSettings(), + clientContext); + this.listLogicalProductVariantsCallable = + callableFactory.createUnaryCallable( + listLogicalProductVariantsTransportSettings, + settings.listLogicalProductVariantsSettings(), + clientContext); + this.listLogicalProductVariantsPagedCallable = + callableFactory.createPagedCallable( + listLogicalProductVariantsTransportSettings, + settings.listLogicalProductVariantsSettings(), + clientContext); + this.lookupEntityCallable = + callableFactory.createUnaryCallable( + lookupEntityTransportSettings, settings.lookupEntitySettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getProductSuiteMethodDescriptor); + methodDescriptors.add(listProductSuitesMethodDescriptor); + methodDescriptors.add(getLogicalProductMethodDescriptor); + methodDescriptors.add(listLogicalProductsMethodDescriptor); + methodDescriptors.add(getLogicalProductVariantMethodDescriptor); + methodDescriptors.add(listLogicalProductVariantsMethodDescriptor); + methodDescriptors.add(lookupEntityMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable getProductSuiteCallable() { + return getProductSuiteCallable; + } + + @Override + public UnaryCallable + listProductSuitesCallable() { + return listProductSuitesCallable; + } + + @Override + public UnaryCallable + listProductSuitesPagedCallable() { + return listProductSuitesPagedCallable; + } + + @Override + public UnaryCallable getLogicalProductCallable() { + return getLogicalProductCallable; + } + + @Override + public UnaryCallable + listLogicalProductsCallable() { + return listLogicalProductsCallable; + } + + @Override + public UnaryCallable + listLogicalProductsPagedCallable() { + return listLogicalProductsPagedCallable; + } + + @Override + public UnaryCallable + getLogicalProductVariantCallable() { + return getLogicalProductVariantCallable; + } + + @Override + public UnaryCallable + listLogicalProductVariantsCallable() { + return listLogicalProductVariantsCallable; + } + + @Override + public UnaryCallable + listLogicalProductVariantsPagedCallable() { + return listLogicalProductVariantsPagedCallable; + } + + @Override + public UnaryCallable lookupEntityCallable() { + return lookupEntityCallable; + } + + @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-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/Version.java b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/Version.java new file mode 100644 index 000000000000..5a9ec7776a10 --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/src/main/java/com/google/cloud/productregistry/v1/stub/Version.java @@ -0,0 +1,27 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.stub; + +import com.google.api.core.InternalApi; + +@InternalApi("For internal use only") +final class Version { + // {x-version-update-start:google-cloud-productregistry:current} + static final String VERSION = "0.0.0-SNAPSHOT"; + // {x-version-update-end} + +} diff --git a/java-productregistry/google-cloud-productregistry/src/main/resources/META-INF/native-image/com.google.cloud.productregistry.v1/reflect-config.json b/java-productregistry/google-cloud-productregistry/src/main/resources/META-INF/native-image/com.google.cloud.productregistry.v1/reflect-config.json new file mode 100644 index 000000000000..a54a15279cdc --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/src/main/resources/META-INF/native-image/com.google.cloud.productregistry.v1/reflect-config.json @@ -0,0 +1,1550 @@ +[ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.GetLogicalProductRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.GetLogicalProductRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.GetProductSuiteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.GetProductSuiteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.LifecycleState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.ListLogicalProductsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.ListLogicalProductsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.ListLogicalProductsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.ListLogicalProductsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.ListProductSuitesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.ListProductSuitesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.ListProductSuitesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.ListProductSuitesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.LogicalProduct", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.LogicalProduct$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.LogicalProductVariant", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.LogicalProductVariant$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.LookupEntityRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.LookupEntityRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.LookupEntityResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.LookupEntityResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.ProductSuite", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.productregistry.v1.ProductSuite$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-productregistry/google-cloud-productregistry/src/test/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceClientHttpJsonTest.java b/java-productregistry/google-cloud-productregistry/src/test/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..eb6a22fbb051 --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/src/test/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceClientHttpJsonTest.java @@ -0,0 +1,640 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1; + +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListLogicalProductVariantsPagedResponse; +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListLogicalProductsPagedResponse; +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListProductSuitesPagedResponse; + +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.productregistry.v1.stub.HttpJsonCloudProductRegistryReadServiceStub; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class CloudProductRegistryReadServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static CloudProductRegistryReadServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonCloudProductRegistryReadServiceStub.getMethodDescriptors(), + CloudProductRegistryReadServiceSettings.getDefaultEndpoint()); + CloudProductRegistryReadServiceSettings settings = + CloudProductRegistryReadServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + CloudProductRegistryReadServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CloudProductRegistryReadServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void getProductSuiteTest() throws Exception { + ProductSuite expectedResponse = + ProductSuite.newBuilder() + .setName(ProductSuiteName.of("[PRODUCT_SUITE]").toString()) + .setTitle("title110371416") + .addAllLogicalProducts(new ArrayList()) + .setReplaced(true) + .setReplacement("replacement430919186") + .build(); + mockService.addResponse(expectedResponse); + + ProductSuiteName name = ProductSuiteName.of("[PRODUCT_SUITE]"); + + ProductSuite actualResponse = client.getProductSuite(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 getProductSuiteExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductSuiteName name = ProductSuiteName.of("[PRODUCT_SUITE]"); + client.getProductSuite(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductSuiteTest2() throws Exception { + ProductSuite expectedResponse = + ProductSuite.newBuilder() + .setName(ProductSuiteName.of("[PRODUCT_SUITE]").toString()) + .setTitle("title110371416") + .addAllLogicalProducts(new ArrayList()) + .setReplaced(true) + .setReplacement("replacement430919186") + .build(); + mockService.addResponse(expectedResponse); + + String name = "productSuites/productSuite-5478"; + + ProductSuite actualResponse = client.getProductSuite(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 getProductSuiteExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "productSuites/productSuite-5478"; + client.getProductSuite(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductSuitesTest() throws Exception { + ProductSuite responsesElement = ProductSuite.newBuilder().build(); + ListProductSuitesResponse expectedResponse = + ListProductSuitesResponse.newBuilder() + .setNextPageToken("") + .addAllProductSuites(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListProductSuitesRequest request = + ListProductSuitesRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListProductSuitesPagedResponse pagedListResponse = client.listProductSuites(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductSuitesList().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 listProductSuitesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListProductSuitesRequest request = + ListProductSuitesRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listProductSuites(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLogicalProductTest() throws Exception { + LogicalProduct expectedResponse = + LogicalProduct.newBuilder() + .setName(LogicalProductName.of("[LOGICAL_PRODUCT]").toString()) + .setTitle("title110371416") + .setProductSuite(ProductSuiteName.of("[PRODUCT_SUITE]").toString()) + .addAllVariants(new ArrayList()) + .setLifecycleState(LifecycleState.forNumber(0)) + .setReplaced(true) + .setReplacement("replacement430919186") + .build(); + mockService.addResponse(expectedResponse); + + LogicalProductName name = LogicalProductName.of("[LOGICAL_PRODUCT]"); + + LogicalProduct actualResponse = client.getLogicalProduct(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 getLogicalProductExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LogicalProductName name = LogicalProductName.of("[LOGICAL_PRODUCT]"); + client.getLogicalProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLogicalProductTest2() throws Exception { + LogicalProduct expectedResponse = + LogicalProduct.newBuilder() + .setName(LogicalProductName.of("[LOGICAL_PRODUCT]").toString()) + .setTitle("title110371416") + .setProductSuite(ProductSuiteName.of("[PRODUCT_SUITE]").toString()) + .addAllVariants(new ArrayList()) + .setLifecycleState(LifecycleState.forNumber(0)) + .setReplaced(true) + .setReplacement("replacement430919186") + .build(); + mockService.addResponse(expectedResponse); + + String name = "logicalProducts/logicalProduct-7011"; + + LogicalProduct actualResponse = client.getLogicalProduct(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 getLogicalProductExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "logicalProducts/logicalProduct-7011"; + client.getLogicalProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLogicalProductsTest() throws Exception { + LogicalProduct responsesElement = LogicalProduct.newBuilder().build(); + ListLogicalProductsResponse expectedResponse = + ListLogicalProductsResponse.newBuilder() + .setNextPageToken("") + .addAllLogicalProducts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLogicalProductsRequest request = + ListLogicalProductsRequest.newBuilder() + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLogicalProductsPagedResponse pagedListResponse = client.listLogicalProducts(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLogicalProductsList().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 listLogicalProductsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLogicalProductsRequest request = + ListLogicalProductsRequest.newBuilder() + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLogicalProducts(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLogicalProductVariantTest() throws Exception { + LogicalProductVariant expectedResponse = + LogicalProductVariant.newBuilder() + .setName(LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]").toString()) + .setTitle("title110371416") + .setLifecycleState(LifecycleState.forNumber(0)) + .setReplaced(true) + .setReplacement("replacement430919186") + .build(); + mockService.addResponse(expectedResponse); + + LogicalProductVariantName name = LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]"); + + LogicalProductVariant actualResponse = client.getLogicalProductVariant(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 getLogicalProductVariantExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LogicalProductVariantName name = + LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]"); + client.getLogicalProductVariant(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLogicalProductVariantTest2() throws Exception { + LogicalProductVariant expectedResponse = + LogicalProductVariant.newBuilder() + .setName(LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]").toString()) + .setTitle("title110371416") + .setLifecycleState(LifecycleState.forNumber(0)) + .setReplaced(true) + .setReplacement("replacement430919186") + .build(); + mockService.addResponse(expectedResponse); + + String name = "logicalProducts/logicalProduct-8757/variants/variant-8757"; + + LogicalProductVariant actualResponse = client.getLogicalProductVariant(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 getLogicalProductVariantExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "logicalProducts/logicalProduct-8757/variants/variant-8757"; + client.getLogicalProductVariant(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLogicalProductVariantsTest() throws Exception { + LogicalProductVariant responsesElement = LogicalProductVariant.newBuilder().build(); + ListLogicalProductVariantsResponse expectedResponse = + ListLogicalProductVariantsResponse.newBuilder() + .setNextPageToken("") + .addAllLogicalProductVariants(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LogicalProductName parent = LogicalProductName.of("[LOGICAL_PRODUCT]"); + + ListLogicalProductVariantsPagedResponse pagedListResponse = + client.listLogicalProductVariants(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLogicalProductVariantsList().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 listLogicalProductVariantsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LogicalProductName parent = LogicalProductName.of("[LOGICAL_PRODUCT]"); + client.listLogicalProductVariants(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLogicalProductVariantsTest2() throws Exception { + LogicalProductVariant responsesElement = LogicalProductVariant.newBuilder().build(); + ListLogicalProductVariantsResponse expectedResponse = + ListLogicalProductVariantsResponse.newBuilder() + .setNextPageToken("") + .addAllLogicalProductVariants(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "logicalProducts/logicalProduct-5742"; + + ListLogicalProductVariantsPagedResponse pagedListResponse = + client.listLogicalProductVariants(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLogicalProductVariantsList().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 listLogicalProductVariantsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "logicalProducts/logicalProduct-5742"; + client.listLogicalProductVariants(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void lookupEntityTest() throws Exception { + LookupEntityResponse expectedResponse = LookupEntityResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + LookupEntityRequest request = + LookupEntityRequest.newBuilder() + .setLookupUri("logicalProducts/logicalProduct-3418") + .build(); + + LookupEntityResponse actualResponse = client.lookupEntity(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 lookupEntityExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LookupEntityRequest request = + LookupEntityRequest.newBuilder() + .setLookupUri("logicalProducts/logicalProduct-3418") + .build(); + client.lookupEntity(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-productregistry/google-cloud-productregistry/src/test/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceClientTest.java b/java-productregistry/google-cloud-productregistry/src/test/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceClientTest.java new file mode 100644 index 000000000000..3ab1580f705d --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/src/test/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceClientTest.java @@ -0,0 +1,581 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1; + +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListLogicalProductVariantsPagedResponse; +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListLogicalProductsPagedResponse; +import static com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient.ListProductSuitesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import 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 CloudProductRegistryReadServiceClientTest { + private static MockCloudProductRegistryReadService mockCloudProductRegistryReadService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private CloudProductRegistryReadServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockCloudProductRegistryReadService = new MockCloudProductRegistryReadService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockCloudProductRegistryReadService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + CloudProductRegistryReadServiceSettings settings = + CloudProductRegistryReadServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CloudProductRegistryReadServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getProductSuiteTest() throws Exception { + ProductSuite expectedResponse = + ProductSuite.newBuilder() + .setName(ProductSuiteName.of("[PRODUCT_SUITE]").toString()) + .setTitle("title110371416") + .addAllLogicalProducts(new ArrayList()) + .setReplaced(true) + .setReplacement("replacement430919186") + .build(); + mockCloudProductRegistryReadService.addResponse(expectedResponse); + + ProductSuiteName name = ProductSuiteName.of("[PRODUCT_SUITE]"); + + ProductSuite actualResponse = client.getProductSuite(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudProductRegistryReadService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductSuiteRequest actualRequest = ((GetProductSuiteRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductSuiteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudProductRegistryReadService.addException(exception); + + try { + ProductSuiteName name = ProductSuiteName.of("[PRODUCT_SUITE]"); + client.getProductSuite(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductSuiteTest2() throws Exception { + ProductSuite expectedResponse = + ProductSuite.newBuilder() + .setName(ProductSuiteName.of("[PRODUCT_SUITE]").toString()) + .setTitle("title110371416") + .addAllLogicalProducts(new ArrayList()) + .setReplaced(true) + .setReplacement("replacement430919186") + .build(); + mockCloudProductRegistryReadService.addResponse(expectedResponse); + + String name = "name3373707"; + + ProductSuite actualResponse = client.getProductSuite(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudProductRegistryReadService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductSuiteRequest actualRequest = ((GetProductSuiteRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductSuiteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudProductRegistryReadService.addException(exception); + + try { + String name = "name3373707"; + client.getProductSuite(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductSuitesTest() throws Exception { + ProductSuite responsesElement = ProductSuite.newBuilder().build(); + ListProductSuitesResponse expectedResponse = + ListProductSuitesResponse.newBuilder() + .setNextPageToken("") + .addAllProductSuites(Arrays.asList(responsesElement)) + .build(); + mockCloudProductRegistryReadService.addResponse(expectedResponse); + + ListProductSuitesRequest request = + ListProductSuitesRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListProductSuitesPagedResponse pagedListResponse = client.listProductSuites(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductSuitesList().get(0), resources.get(0)); + + List actualRequests = mockCloudProductRegistryReadService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductSuitesRequest actualRequest = ((ListProductSuitesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductSuitesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudProductRegistryReadService.addException(exception); + + try { + ListProductSuitesRequest request = + ListProductSuitesRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listProductSuites(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLogicalProductTest() throws Exception { + LogicalProduct expectedResponse = + LogicalProduct.newBuilder() + .setName(LogicalProductName.of("[LOGICAL_PRODUCT]").toString()) + .setTitle("title110371416") + .setProductSuite(ProductSuiteName.of("[PRODUCT_SUITE]").toString()) + .addAllVariants(new ArrayList()) + .setLifecycleState(LifecycleState.forNumber(0)) + .setReplaced(true) + .setReplacement("replacement430919186") + .build(); + mockCloudProductRegistryReadService.addResponse(expectedResponse); + + LogicalProductName name = LogicalProductName.of("[LOGICAL_PRODUCT]"); + + LogicalProduct actualResponse = client.getLogicalProduct(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudProductRegistryReadService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLogicalProductRequest actualRequest = ((GetLogicalProductRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLogicalProductExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudProductRegistryReadService.addException(exception); + + try { + LogicalProductName name = LogicalProductName.of("[LOGICAL_PRODUCT]"); + client.getLogicalProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLogicalProductTest2() throws Exception { + LogicalProduct expectedResponse = + LogicalProduct.newBuilder() + .setName(LogicalProductName.of("[LOGICAL_PRODUCT]").toString()) + .setTitle("title110371416") + .setProductSuite(ProductSuiteName.of("[PRODUCT_SUITE]").toString()) + .addAllVariants(new ArrayList()) + .setLifecycleState(LifecycleState.forNumber(0)) + .setReplaced(true) + .setReplacement("replacement430919186") + .build(); + mockCloudProductRegistryReadService.addResponse(expectedResponse); + + String name = "name3373707"; + + LogicalProduct actualResponse = client.getLogicalProduct(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudProductRegistryReadService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLogicalProductRequest actualRequest = ((GetLogicalProductRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLogicalProductExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudProductRegistryReadService.addException(exception); + + try { + String name = "name3373707"; + client.getLogicalProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLogicalProductsTest() throws Exception { + LogicalProduct responsesElement = LogicalProduct.newBuilder().build(); + ListLogicalProductsResponse expectedResponse = + ListLogicalProductsResponse.newBuilder() + .setNextPageToken("") + .addAllLogicalProducts(Arrays.asList(responsesElement)) + .build(); + mockCloudProductRegistryReadService.addResponse(expectedResponse); + + ListLogicalProductsRequest request = + ListLogicalProductsRequest.newBuilder() + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLogicalProductsPagedResponse pagedListResponse = client.listLogicalProducts(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLogicalProductsList().get(0), resources.get(0)); + + List actualRequests = mockCloudProductRegistryReadService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLogicalProductsRequest actualRequest = ((ListLogicalProductsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLogicalProductsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudProductRegistryReadService.addException(exception); + + try { + ListLogicalProductsRequest request = + ListLogicalProductsRequest.newBuilder() + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLogicalProducts(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLogicalProductVariantTest() throws Exception { + LogicalProductVariant expectedResponse = + LogicalProductVariant.newBuilder() + .setName(LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]").toString()) + .setTitle("title110371416") + .setLifecycleState(LifecycleState.forNumber(0)) + .setReplaced(true) + .setReplacement("replacement430919186") + .build(); + mockCloudProductRegistryReadService.addResponse(expectedResponse); + + LogicalProductVariantName name = LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]"); + + LogicalProductVariant actualResponse = client.getLogicalProductVariant(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudProductRegistryReadService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLogicalProductVariantRequest actualRequest = + ((GetLogicalProductVariantRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLogicalProductVariantExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudProductRegistryReadService.addException(exception); + + try { + LogicalProductVariantName name = + LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]"); + client.getLogicalProductVariant(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLogicalProductVariantTest2() throws Exception { + LogicalProductVariant expectedResponse = + LogicalProductVariant.newBuilder() + .setName(LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]").toString()) + .setTitle("title110371416") + .setLifecycleState(LifecycleState.forNumber(0)) + .setReplaced(true) + .setReplacement("replacement430919186") + .build(); + mockCloudProductRegistryReadService.addResponse(expectedResponse); + + String name = "name3373707"; + + LogicalProductVariant actualResponse = client.getLogicalProductVariant(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudProductRegistryReadService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLogicalProductVariantRequest actualRequest = + ((GetLogicalProductVariantRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLogicalProductVariantExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudProductRegistryReadService.addException(exception); + + try { + String name = "name3373707"; + client.getLogicalProductVariant(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLogicalProductVariantsTest() throws Exception { + LogicalProductVariant responsesElement = LogicalProductVariant.newBuilder().build(); + ListLogicalProductVariantsResponse expectedResponse = + ListLogicalProductVariantsResponse.newBuilder() + .setNextPageToken("") + .addAllLogicalProductVariants(Arrays.asList(responsesElement)) + .build(); + mockCloudProductRegistryReadService.addResponse(expectedResponse); + + LogicalProductName parent = LogicalProductName.of("[LOGICAL_PRODUCT]"); + + ListLogicalProductVariantsPagedResponse pagedListResponse = + client.listLogicalProductVariants(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLogicalProductVariantsList().get(0), resources.get(0)); + + List actualRequests = mockCloudProductRegistryReadService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLogicalProductVariantsRequest actualRequest = + ((ListLogicalProductVariantsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLogicalProductVariantsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudProductRegistryReadService.addException(exception); + + try { + LogicalProductName parent = LogicalProductName.of("[LOGICAL_PRODUCT]"); + client.listLogicalProductVariants(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLogicalProductVariantsTest2() throws Exception { + LogicalProductVariant responsesElement = LogicalProductVariant.newBuilder().build(); + ListLogicalProductVariantsResponse expectedResponse = + ListLogicalProductVariantsResponse.newBuilder() + .setNextPageToken("") + .addAllLogicalProductVariants(Arrays.asList(responsesElement)) + .build(); + mockCloudProductRegistryReadService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListLogicalProductVariantsPagedResponse pagedListResponse = + client.listLogicalProductVariants(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLogicalProductVariantsList().get(0), resources.get(0)); + + List actualRequests = mockCloudProductRegistryReadService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLogicalProductVariantsRequest actualRequest = + ((ListLogicalProductVariantsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLogicalProductVariantsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudProductRegistryReadService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listLogicalProductVariants(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void lookupEntityTest() throws Exception { + LookupEntityResponse expectedResponse = LookupEntityResponse.newBuilder().build(); + mockCloudProductRegistryReadService.addResponse(expectedResponse); + + LookupEntityRequest request = + LookupEntityRequest.newBuilder().setLookupUri("lookupUri1150318994").build(); + + LookupEntityResponse actualResponse = client.lookupEntity(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudProductRegistryReadService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + LookupEntityRequest actualRequest = ((LookupEntityRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getLookupUri(), actualRequest.getLookupUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void lookupEntityExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudProductRegistryReadService.addException(exception); + + try { + LookupEntityRequest request = + LookupEntityRequest.newBuilder().setLookupUri("lookupUri1150318994").build(); + client.lookupEntity(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-productregistry/google-cloud-productregistry/src/test/java/com/google/cloud/productregistry/v1/MockCloudProductRegistryReadService.java b/java-productregistry/google-cloud-productregistry/src/test/java/com/google/cloud/productregistry/v1/MockCloudProductRegistryReadService.java new file mode 100644 index 000000000000..3ff1f10fd247 --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/src/test/java/com/google/cloud/productregistry/v1/MockCloudProductRegistryReadService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1; + +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 MockCloudProductRegistryReadService implements MockGrpcService { + private final MockCloudProductRegistryReadServiceImpl serviceImpl; + + public MockCloudProductRegistryReadService() { + serviceImpl = new MockCloudProductRegistryReadServiceImpl(); + } + + @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-productregistry/google-cloud-productregistry/src/test/java/com/google/cloud/productregistry/v1/MockCloudProductRegistryReadServiceImpl.java b/java-productregistry/google-cloud-productregistry/src/test/java/com/google/cloud/productregistry/v1/MockCloudProductRegistryReadServiceImpl.java new file mode 100644 index 000000000000..9425c332b8e0 --- /dev/null +++ b/java-productregistry/google-cloud-productregistry/src/test/java/com/google/cloud/productregistry/v1/MockCloudProductRegistryReadServiceImpl.java @@ -0,0 +1,214 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceGrpc.CloudProductRegistryReadServiceImplBase; +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 MockCloudProductRegistryReadServiceImpl + extends CloudProductRegistryReadServiceImplBase { + private List requests; + private Queue responses; + + public MockCloudProductRegistryReadServiceImpl() { + 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 getProductSuite( + GetProductSuiteRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ProductSuite) { + requests.add(request); + responseObserver.onNext(((ProductSuite) 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 GetProductSuite, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ProductSuite.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listProductSuites( + ListProductSuitesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListProductSuitesResponse) { + requests.add(request); + responseObserver.onNext(((ListProductSuitesResponse) 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 ListProductSuites, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListProductSuitesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLogicalProduct( + GetLogicalProductRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof LogicalProduct) { + requests.add(request); + responseObserver.onNext(((LogicalProduct) 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 GetLogicalProduct, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + LogicalProduct.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listLogicalProducts( + ListLogicalProductsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLogicalProductsResponse) { + requests.add(request); + responseObserver.onNext(((ListLogicalProductsResponse) 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 ListLogicalProducts, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLogicalProductsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLogicalProductVariant( + GetLogicalProductVariantRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof LogicalProductVariant) { + requests.add(request); + responseObserver.onNext(((LogicalProductVariant) 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 GetLogicalProductVariant, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + LogicalProductVariant.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listLogicalProductVariants( + ListLogicalProductVariantsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLogicalProductVariantsResponse) { + requests.add(request); + responseObserver.onNext(((ListLogicalProductVariantsResponse) 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 ListLogicalProductVariants, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + ListLogicalProductVariantsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void lookupEntity( + LookupEntityRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof LookupEntityResponse) { + requests.add(request); + responseObserver.onNext(((LookupEntityResponse) 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 LookupEntity, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + LookupEntityResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-productregistry/grpc-google-cloud-productregistry-v1/pom.xml b/java-productregistry/grpc-google-cloud-productregistry-v1/pom.xml new file mode 100644 index 000000000000..4f33ddda4be0 --- /dev/null +++ b/java-productregistry/grpc-google-cloud-productregistry-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-productregistry-v1 + 0.1.0-SNAPSHOT + grpc-google-cloud-productregistry-v1 + GRPC library for google-cloud-productregistry + + com.google.cloud + google-cloud-productregistry-parent + 0.1.0-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-productregistry-v1 + + + com.google.guava + guava + + + diff --git a/java-productregistry/grpc-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceGrpc.java b/java-productregistry/grpc-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceGrpc.java new file mode 100644 index 000000000000..5fd13188cfdb --- /dev/null +++ b/java-productregistry/grpc-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceGrpc.java @@ -0,0 +1,1299 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.productregistry.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Cloud Product Registry Read Service provides capabilities to access all first
+ * and third party Google Cloud products.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class CloudProductRegistryReadServiceGrpc { + + private CloudProductRegistryReadServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.productregistry.v1.CloudProductRegistryReadService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.GetProductSuiteRequest, + com.google.cloud.productregistry.v1.ProductSuite> + getGetProductSuiteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProductSuite", + requestType = com.google.cloud.productregistry.v1.GetProductSuiteRequest.class, + responseType = com.google.cloud.productregistry.v1.ProductSuite.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.GetProductSuiteRequest, + com.google.cloud.productregistry.v1.ProductSuite> + getGetProductSuiteMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.GetProductSuiteRequest, + com.google.cloud.productregistry.v1.ProductSuite> + getGetProductSuiteMethod; + if ((getGetProductSuiteMethod = CloudProductRegistryReadServiceGrpc.getGetProductSuiteMethod) + == null) { + synchronized (CloudProductRegistryReadServiceGrpc.class) { + if ((getGetProductSuiteMethod = + CloudProductRegistryReadServiceGrpc.getGetProductSuiteMethod) + == null) { + CloudProductRegistryReadServiceGrpc.getGetProductSuiteMethod = + getGetProductSuiteMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProductSuite")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.productregistry.v1.GetProductSuiteRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.productregistry.v1.ProductSuite + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudProductRegistryReadServiceMethodDescriptorSupplier( + "GetProductSuite")) + .build(); + } + } + } + return getGetProductSuiteMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.ListProductSuitesRequest, + com.google.cloud.productregistry.v1.ListProductSuitesResponse> + getListProductSuitesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProductSuites", + requestType = com.google.cloud.productregistry.v1.ListProductSuitesRequest.class, + responseType = com.google.cloud.productregistry.v1.ListProductSuitesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.ListProductSuitesRequest, + com.google.cloud.productregistry.v1.ListProductSuitesResponse> + getListProductSuitesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.ListProductSuitesRequest, + com.google.cloud.productregistry.v1.ListProductSuitesResponse> + getListProductSuitesMethod; + if ((getListProductSuitesMethod = + CloudProductRegistryReadServiceGrpc.getListProductSuitesMethod) + == null) { + synchronized (CloudProductRegistryReadServiceGrpc.class) { + if ((getListProductSuitesMethod = + CloudProductRegistryReadServiceGrpc.getListProductSuitesMethod) + == null) { + CloudProductRegistryReadServiceGrpc.getListProductSuitesMethod = + getListProductSuitesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProductSuites")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.productregistry.v1.ListProductSuitesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.productregistry.v1.ListProductSuitesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudProductRegistryReadServiceMethodDescriptorSupplier( + "ListProductSuites")) + .build(); + } + } + } + return getListProductSuitesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.GetLogicalProductRequest, + com.google.cloud.productregistry.v1.LogicalProduct> + getGetLogicalProductMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetLogicalProduct", + requestType = com.google.cloud.productregistry.v1.GetLogicalProductRequest.class, + responseType = com.google.cloud.productregistry.v1.LogicalProduct.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.GetLogicalProductRequest, + com.google.cloud.productregistry.v1.LogicalProduct> + getGetLogicalProductMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.GetLogicalProductRequest, + com.google.cloud.productregistry.v1.LogicalProduct> + getGetLogicalProductMethod; + if ((getGetLogicalProductMethod = + CloudProductRegistryReadServiceGrpc.getGetLogicalProductMethod) + == null) { + synchronized (CloudProductRegistryReadServiceGrpc.class) { + if ((getGetLogicalProductMethod = + CloudProductRegistryReadServiceGrpc.getGetLogicalProductMethod) + == null) { + CloudProductRegistryReadServiceGrpc.getGetLogicalProductMethod = + getGetLogicalProductMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLogicalProduct")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.productregistry.v1.GetLogicalProductRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.productregistry.v1.LogicalProduct + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudProductRegistryReadServiceMethodDescriptorSupplier( + "GetLogicalProduct")) + .build(); + } + } + } + return getGetLogicalProductMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.ListLogicalProductsRequest, + com.google.cloud.productregistry.v1.ListLogicalProductsResponse> + getListLogicalProductsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListLogicalProducts", + requestType = com.google.cloud.productregistry.v1.ListLogicalProductsRequest.class, + responseType = com.google.cloud.productregistry.v1.ListLogicalProductsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.ListLogicalProductsRequest, + com.google.cloud.productregistry.v1.ListLogicalProductsResponse> + getListLogicalProductsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.ListLogicalProductsRequest, + com.google.cloud.productregistry.v1.ListLogicalProductsResponse> + getListLogicalProductsMethod; + if ((getListLogicalProductsMethod = + CloudProductRegistryReadServiceGrpc.getListLogicalProductsMethod) + == null) { + synchronized (CloudProductRegistryReadServiceGrpc.class) { + if ((getListLogicalProductsMethod = + CloudProductRegistryReadServiceGrpc.getListLogicalProductsMethod) + == null) { + CloudProductRegistryReadServiceGrpc.getListLogicalProductsMethod = + getListLogicalProductsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListLogicalProducts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.productregistry.v1.ListLogicalProductsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.productregistry.v1.ListLogicalProductsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudProductRegistryReadServiceMethodDescriptorSupplier( + "ListLogicalProducts")) + .build(); + } + } + } + return getListLogicalProductsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest, + com.google.cloud.productregistry.v1.LogicalProductVariant> + getGetLogicalProductVariantMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetLogicalProductVariant", + requestType = com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest.class, + responseType = com.google.cloud.productregistry.v1.LogicalProductVariant.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest, + com.google.cloud.productregistry.v1.LogicalProductVariant> + getGetLogicalProductVariantMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest, + com.google.cloud.productregistry.v1.LogicalProductVariant> + getGetLogicalProductVariantMethod; + if ((getGetLogicalProductVariantMethod = + CloudProductRegistryReadServiceGrpc.getGetLogicalProductVariantMethod) + == null) { + synchronized (CloudProductRegistryReadServiceGrpc.class) { + if ((getGetLogicalProductVariantMethod = + CloudProductRegistryReadServiceGrpc.getGetLogicalProductVariantMethod) + == null) { + CloudProductRegistryReadServiceGrpc.getGetLogicalProductVariantMethod = + getGetLogicalProductVariantMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetLogicalProductVariant")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.productregistry.v1.LogicalProductVariant + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudProductRegistryReadServiceMethodDescriptorSupplier( + "GetLogicalProductVariant")) + .build(); + } + } + } + return getGetLogicalProductVariantMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest, + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse> + getListLogicalProductVariantsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListLogicalProductVariants", + requestType = com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest.class, + responseType = com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest, + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse> + getListLogicalProductVariantsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest, + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse> + getListLogicalProductVariantsMethod; + if ((getListLogicalProductVariantsMethod = + CloudProductRegistryReadServiceGrpc.getListLogicalProductVariantsMethod) + == null) { + synchronized (CloudProductRegistryReadServiceGrpc.class) { + if ((getListLogicalProductVariantsMethod = + CloudProductRegistryReadServiceGrpc.getListLogicalProductVariantsMethod) + == null) { + CloudProductRegistryReadServiceGrpc.getListLogicalProductVariantsMethod = + getListLogicalProductVariantsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListLogicalProductVariants")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudProductRegistryReadServiceMethodDescriptorSupplier( + "ListLogicalProductVariants")) + .build(); + } + } + } + return getListLogicalProductVariantsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.LookupEntityRequest, + com.google.cloud.productregistry.v1.LookupEntityResponse> + getLookupEntityMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LookupEntity", + requestType = com.google.cloud.productregistry.v1.LookupEntityRequest.class, + responseType = com.google.cloud.productregistry.v1.LookupEntityResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.LookupEntityRequest, + com.google.cloud.productregistry.v1.LookupEntityResponse> + getLookupEntityMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.productregistry.v1.LookupEntityRequest, + com.google.cloud.productregistry.v1.LookupEntityResponse> + getLookupEntityMethod; + if ((getLookupEntityMethod = CloudProductRegistryReadServiceGrpc.getLookupEntityMethod) + == null) { + synchronized (CloudProductRegistryReadServiceGrpc.class) { + if ((getLookupEntityMethod = CloudProductRegistryReadServiceGrpc.getLookupEntityMethod) + == null) { + CloudProductRegistryReadServiceGrpc.getLookupEntityMethod = + getLookupEntityMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LookupEntity")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.productregistry.v1.LookupEntityRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.productregistry.v1.LookupEntityResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudProductRegistryReadServiceMethodDescriptorSupplier( + "LookupEntity")) + .build(); + } + } + } + return getLookupEntityMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static CloudProductRegistryReadServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudProductRegistryReadServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudProductRegistryReadServiceStub(channel, callOptions); + } + }; + return CloudProductRegistryReadServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static CloudProductRegistryReadServiceBlockingV2Stub newBlockingV2Stub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudProductRegistryReadServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudProductRegistryReadServiceBlockingV2Stub(channel, callOptions); + } + }; + return CloudProductRegistryReadServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static CloudProductRegistryReadServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudProductRegistryReadServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudProductRegistryReadServiceBlockingStub(channel, callOptions); + } + }; + return CloudProductRegistryReadServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static CloudProductRegistryReadServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudProductRegistryReadServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudProductRegistryReadServiceFutureStub(channel, callOptions); + } + }; + return CloudProductRegistryReadServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Cloud Product Registry Read Service provides capabilities to access all first
+   * and third party Google Cloud products.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Get details of a ProductSuite.
+     * 
+ */ + default void getProductSuite( + com.google.cloud.productregistry.v1.GetProductSuiteRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetProductSuiteMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists ProductSuites.
+     * 
+ */ + default void listProductSuites( + com.google.cloud.productregistry.v1.ListProductSuitesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListProductSuitesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a LogicalProduct.
+     * 
+ */ + default void getLogicalProduct( + com.google.cloud.productregistry.v1.GetLogicalProductRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetLogicalProductMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists LogicalProducts matching given criteria.
+     * 
+ */ + default void listLogicalProducts( + com.google.cloud.productregistry.v1.ListLogicalProductsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListLogicalProductsMethod(), responseObserver); + } + + /** + * + * + *
+     * Get details of a LogicalProductVariant.
+     * 
+ */ + default void getLogicalProductVariant( + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetLogicalProductVariantMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists LogicalProductVariants matching given criteria.
+     * 
+ */ + default void listLogicalProductVariants( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListLogicalProductVariantsMethod(), responseObserver); + } + + /** + * + * + *
+     * Look up entities.
+     * 
+ */ + default void lookupEntity( + com.google.cloud.productregistry.v1.LookupEntityRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getLookupEntityMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service CloudProductRegistryReadService. + * + *
+   * Cloud Product Registry Read Service provides capabilities to access all first
+   * and third party Google Cloud products.
+   * 
+ */ + public abstract static class CloudProductRegistryReadServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return CloudProductRegistryReadServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service + * CloudProductRegistryReadService. + * + *
+   * Cloud Product Registry Read Service provides capabilities to access all first
+   * and third party Google Cloud products.
+   * 
+ */ + public static final class CloudProductRegistryReadServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private CloudProductRegistryReadServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudProductRegistryReadServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudProductRegistryReadServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Get details of a ProductSuite.
+     * 
+ */ + public void getProductSuite( + com.google.cloud.productregistry.v1.GetProductSuiteRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetProductSuiteMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists ProductSuites.
+     * 
+ */ + public void listProductSuites( + com.google.cloud.productregistry.v1.ListProductSuitesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListProductSuitesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a LogicalProduct.
+     * 
+ */ + public void getLogicalProduct( + com.google.cloud.productregistry.v1.GetLogicalProductRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetLogicalProductMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists LogicalProducts matching given criteria.
+     * 
+ */ + public void listLogicalProducts( + com.google.cloud.productregistry.v1.ListLogicalProductsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListLogicalProductsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get details of a LogicalProductVariant.
+     * 
+ */ + public void getLogicalProductVariant( + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetLogicalProductVariantMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists LogicalProductVariants matching given criteria.
+     * 
+ */ + public void listLogicalProductVariants( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListLogicalProductVariantsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Look up entities.
+     * 
+ */ + public void lookupEntity( + com.google.cloud.productregistry.v1.LookupEntityRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getLookupEntityMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service CloudProductRegistryReadService. + * + *
+   * Cloud Product Registry Read Service provides capabilities to access all first
+   * and third party Google Cloud products.
+   * 
+ */ + public static final class CloudProductRegistryReadServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private CloudProductRegistryReadServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudProductRegistryReadServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudProductRegistryReadServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Get details of a ProductSuite.
+     * 
+ */ + public com.google.cloud.productregistry.v1.ProductSuite getProductSuite( + com.google.cloud.productregistry.v1.GetProductSuiteRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetProductSuiteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists ProductSuites.
+     * 
+ */ + public com.google.cloud.productregistry.v1.ListProductSuitesResponse listProductSuites( + com.google.cloud.productregistry.v1.ListProductSuitesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListProductSuitesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a LogicalProduct.
+     * 
+ */ + public com.google.cloud.productregistry.v1.LogicalProduct getLogicalProduct( + com.google.cloud.productregistry.v1.GetLogicalProductRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetLogicalProductMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists LogicalProducts matching given criteria.
+     * 
+ */ + public com.google.cloud.productregistry.v1.ListLogicalProductsResponse listLogicalProducts( + com.google.cloud.productregistry.v1.ListLogicalProductsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListLogicalProductsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get details of a LogicalProductVariant.
+     * 
+ */ + public com.google.cloud.productregistry.v1.LogicalProductVariant getLogicalProductVariant( + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetLogicalProductVariantMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists LogicalProductVariants matching given criteria.
+     * 
+ */ + public com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse + listLogicalProductVariants( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListLogicalProductVariantsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Look up entities.
+     * 
+ */ + public com.google.cloud.productregistry.v1.LookupEntityResponse lookupEntity( + com.google.cloud.productregistry.v1.LookupEntityRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getLookupEntityMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service + * CloudProductRegistryReadService. + * + *
+   * Cloud Product Registry Read Service provides capabilities to access all first
+   * and third party Google Cloud products.
+   * 
+ */ + public static final class CloudProductRegistryReadServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private CloudProductRegistryReadServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudProductRegistryReadServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudProductRegistryReadServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Get details of a ProductSuite.
+     * 
+ */ + public com.google.cloud.productregistry.v1.ProductSuite getProductSuite( + com.google.cloud.productregistry.v1.GetProductSuiteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProductSuiteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists ProductSuites.
+     * 
+ */ + public com.google.cloud.productregistry.v1.ListProductSuitesResponse listProductSuites( + com.google.cloud.productregistry.v1.ListProductSuitesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProductSuitesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a LogicalProduct.
+     * 
+ */ + public com.google.cloud.productregistry.v1.LogicalProduct getLogicalProduct( + com.google.cloud.productregistry.v1.GetLogicalProductRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetLogicalProductMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists LogicalProducts matching given criteria.
+     * 
+ */ + public com.google.cloud.productregistry.v1.ListLogicalProductsResponse listLogicalProducts( + com.google.cloud.productregistry.v1.ListLogicalProductsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListLogicalProductsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get details of a LogicalProductVariant.
+     * 
+ */ + public com.google.cloud.productregistry.v1.LogicalProductVariant getLogicalProductVariant( + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetLogicalProductVariantMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists LogicalProductVariants matching given criteria.
+     * 
+ */ + public com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse + listLogicalProductVariants( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListLogicalProductVariantsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Look up entities.
+     * 
+ */ + public com.google.cloud.productregistry.v1.LookupEntityResponse lookupEntity( + com.google.cloud.productregistry.v1.LookupEntityRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getLookupEntityMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * CloudProductRegistryReadService. + * + *
+   * Cloud Product Registry Read Service provides capabilities to access all first
+   * and third party Google Cloud products.
+   * 
+ */ + public static final class CloudProductRegistryReadServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private CloudProductRegistryReadServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudProductRegistryReadServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudProductRegistryReadServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Get details of a ProductSuite.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.productregistry.v1.ProductSuite> + getProductSuite(com.google.cloud.productregistry.v1.GetProductSuiteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetProductSuiteMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists ProductSuites.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.productregistry.v1.ListProductSuitesResponse> + listProductSuites(com.google.cloud.productregistry.v1.ListProductSuitesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListProductSuitesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a LogicalProduct.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.productregistry.v1.LogicalProduct> + getLogicalProduct(com.google.cloud.productregistry.v1.GetLogicalProductRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetLogicalProductMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists LogicalProducts matching given criteria.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.productregistry.v1.ListLogicalProductsResponse> + listLogicalProducts( + com.google.cloud.productregistry.v1.ListLogicalProductsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListLogicalProductsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get details of a LogicalProductVariant.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.productregistry.v1.LogicalProductVariant> + getLogicalProductVariant( + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetLogicalProductVariantMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists LogicalProductVariants matching given criteria.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse> + listLogicalProductVariants( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListLogicalProductVariantsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Look up entities.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.productregistry.v1.LookupEntityResponse> + lookupEntity(com.google.cloud.productregistry.v1.LookupEntityRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getLookupEntityMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_PRODUCT_SUITE = 0; + private static final int METHODID_LIST_PRODUCT_SUITES = 1; + private static final int METHODID_GET_LOGICAL_PRODUCT = 2; + private static final int METHODID_LIST_LOGICAL_PRODUCTS = 3; + private static final int METHODID_GET_LOGICAL_PRODUCT_VARIANT = 4; + private static final int METHODID_LIST_LOGICAL_PRODUCT_VARIANTS = 5; + private static final int METHODID_LOOKUP_ENTITY = 6; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_PRODUCT_SUITE: + serviceImpl.getProductSuite( + (com.google.cloud.productregistry.v1.GetProductSuiteRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_PRODUCT_SUITES: + serviceImpl.listProductSuites( + (com.google.cloud.productregistry.v1.ListProductSuitesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.productregistry.v1.ListProductSuitesResponse>) + responseObserver); + break; + case METHODID_GET_LOGICAL_PRODUCT: + serviceImpl.getLogicalProduct( + (com.google.cloud.productregistry.v1.GetLogicalProductRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_LOGICAL_PRODUCTS: + serviceImpl.listLogicalProducts( + (com.google.cloud.productregistry.v1.ListLogicalProductsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.productregistry.v1.ListLogicalProductsResponse>) + responseObserver); + break; + case METHODID_GET_LOGICAL_PRODUCT_VARIANT: + serviceImpl.getLogicalProductVariant( + (com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.productregistry.v1.LogicalProductVariant>) + responseObserver); + break; + case METHODID_LIST_LOGICAL_PRODUCT_VARIANTS: + serviceImpl.listLogicalProductVariants( + (com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse>) + responseObserver); + break; + case METHODID_LOOKUP_ENTITY: + serviceImpl.lookupEntity( + (com.google.cloud.productregistry.v1.LookupEntityRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.productregistry.v1.LookupEntityResponse>) + 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( + getGetProductSuiteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.productregistry.v1.GetProductSuiteRequest, + com.google.cloud.productregistry.v1.ProductSuite>( + service, METHODID_GET_PRODUCT_SUITE))) + .addMethod( + getListProductSuitesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.productregistry.v1.ListProductSuitesRequest, + com.google.cloud.productregistry.v1.ListProductSuitesResponse>( + service, METHODID_LIST_PRODUCT_SUITES))) + .addMethod( + getGetLogicalProductMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.productregistry.v1.GetLogicalProductRequest, + com.google.cloud.productregistry.v1.LogicalProduct>( + service, METHODID_GET_LOGICAL_PRODUCT))) + .addMethod( + getListLogicalProductsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.productregistry.v1.ListLogicalProductsRequest, + com.google.cloud.productregistry.v1.ListLogicalProductsResponse>( + service, METHODID_LIST_LOGICAL_PRODUCTS))) + .addMethod( + getGetLogicalProductVariantMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest, + com.google.cloud.productregistry.v1.LogicalProductVariant>( + service, METHODID_GET_LOGICAL_PRODUCT_VARIANT))) + .addMethod( + getListLogicalProductVariantsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest, + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse>( + service, METHODID_LIST_LOGICAL_PRODUCT_VARIANTS))) + .addMethod( + getLookupEntityMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.productregistry.v1.LookupEntityRequest, + com.google.cloud.productregistry.v1.LookupEntityResponse>( + service, METHODID_LOOKUP_ENTITY))) + .build(); + } + + private abstract static class CloudProductRegistryReadServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + CloudProductRegistryReadServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("CloudProductRegistryReadService"); + } + } + + private static final class CloudProductRegistryReadServiceFileDescriptorSupplier + extends CloudProductRegistryReadServiceBaseDescriptorSupplier { + CloudProductRegistryReadServiceFileDescriptorSupplier() {} + } + + private static final class CloudProductRegistryReadServiceMethodDescriptorSupplier + extends CloudProductRegistryReadServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + CloudProductRegistryReadServiceMethodDescriptorSupplier(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 (CloudProductRegistryReadServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor( + new CloudProductRegistryReadServiceFileDescriptorSupplier()) + .addMethod(getGetProductSuiteMethod()) + .addMethod(getListProductSuitesMethod()) + .addMethod(getGetLogicalProductMethod()) + .addMethod(getListLogicalProductsMethod()) + .addMethod(getGetLogicalProductVariantMethod()) + .addMethod(getListLogicalProductVariantsMethod()) + .addMethod(getLookupEntityMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-productregistry/pom.xml b/java-productregistry/pom.xml new file mode 100644 index 000000000000..45ce62b7fab2 --- /dev/null +++ b/java-productregistry/pom.xml @@ -0,0 +1,58 @@ + + + 4.0.0 + com.google.cloud + google-cloud-productregistry-parent + pom + 0.1.0-SNAPSHOT + Google Cloud Product Registry Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.89.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-cloud-productregistry-parent + + + + + + + com.google.cloud + google-cloud-productregistry + 0.1.0-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-productregistry-v1 + 0.1.0-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-productregistry-v1 + 0.1.0-SNAPSHOT + + + + + + + + google-cloud-productregistry + grpc-google-cloud-productregistry-v1 + proto-google-cloud-productregistry-v1 + + google-cloud-productregistry-bom + + + \ No newline at end of file diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/clirr-ignored-differences.xml b/java-productregistry/proto-google-cloud-productregistry-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..c3e229161a02 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/clirr-ignored-differences.xml @@ -0,0 +1,80 @@ + + + + + 7012 + com/google/cloud/productregistry/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/productregistry/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/productregistry/v1/*OrBuilder + boolean has*(*) + + + + 7006 + com/google/cloud/productregistry/v1/** + * getDefaultInstanceForType() + ** + + + 7006 + com/google/cloud/productregistry/v1/** + * addRepeatedField(*) + ** + + + 7006 + com/google/cloud/productregistry/v1/** + * clear() + ** + + + 7006 + com/google/cloud/productregistry/v1/** + * clearField(*) + ** + + + 7006 + com/google/cloud/productregistry/v1/** + * clearOneof(*) + ** + + + 7006 + com/google/cloud/productregistry/v1/** + * clone() + ** + + + 7006 + com/google/cloud/productregistry/v1/** + * mergeUnknownFields(*) + ** + + + 7006 + com/google/cloud/productregistry/v1/** + * setField(*) + ** + + + 7006 + com/google/cloud/productregistry/v1/** + * setRepeatedField(*) + ** + + + 7006 + com/google/cloud/productregistry/v1/** + * setUnknownFields(*) + ** + + diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/pom.xml b/java-productregistry/proto-google-cloud-productregistry-v1/pom.xml new file mode 100644 index 000000000000..076690edffab --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/pom.xml @@ -0,0 +1,41 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-productregistry-v1 + 0.1.0-SNAPSHOT + proto-google-cloud-productregistry-v1 + Proto library for google-cloud-productregistry + + com.google.cloud + google-cloud-productregistry-parent + 0.1.0-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + org.jspecify + jspecify + + + diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceProto.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceProto.java new file mode 100644 index 000000000000..7756de6ae4b1 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/CloudProductRegistryReadServiceProto.java @@ -0,0 +1,299 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public final class CloudProductRegistryReadServiceProto extends com.google.protobuf.GeneratedFile { + private CloudProductRegistryReadServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CloudProductRegistryReadServiceProto"); + } + + 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_productregistry_v1_GetProductSuiteRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_productregistry_v1_GetProductSuiteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_productregistry_v1_GetLogicalProductRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_productregistry_v1_GetLogicalProductRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_productregistry_v1_GetLogicalProductVariantRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_productregistry_v1_GetLogicalProductVariantRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_productregistry_v1_ListProductSuitesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_productregistry_v1_ListProductSuitesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_productregistry_v1_ListProductSuitesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_productregistry_v1_ListProductSuitesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_productregistry_v1_ListLogicalProductsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_productregistry_v1_ListLogicalProductsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_productregistry_v1_ListLogicalProductsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_productregistry_v1_ListLogicalProductsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_productregistry_v1_LookupEntityRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_productregistry_v1_LookupEntityRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_productregistry_v1_LookupEntityResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_productregistry_v1_LookupEntityResponse_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" + + "Igoogle/cloud/productregistry/v1/cloud_product_registry_read_service.proto\022\037goo" + + "gle.cloud.productregistry.v1\032\034google/api" + + "/annotations.proto\032\027google/api/client.pr" + + "oto\032\037google/api/field_behavior.proto\032\031go" + + "ogle/api/resource.proto\0325google/cloud/productregistry/v1/logical_product.proto\032=" + + "google/cloud/productregistry/v1/logical_" + + "product_variant.proto\0323google/cloud/productregistry/v1/product_suite.proto\"`\n" + + "\026GetProductSuiteRequest\022F\n" + + "\004name\030\001 \001(\tB8\340A\002\372A2\n" + + "0cloudproductregistry.googleapis.com/ProductSuite\"d\n" + + "\030GetLogicalProductRequest\022H\n" + + "\004name\030\001 \001(\tB:\340A\002\372A4\n" + + "2cloudproductregistry.googleapis.com/LogicalProduct\"r\n" + + "\037GetLogicalProductVariantRequest\022O\n" + + "\004name\030\001 \001(\tBA\340A\002\372A;\n" + + "9cloudproductregistry.googleapis.com/LogicalProductVariant\"K\n" + + "\030ListProductSuitesRequest\022\026\n" + + "\tpage_size\030\001 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\002 \001(\tB\003\340A\001\"{\n" + + "\031ListProductSuitesResponse\022E\n" + + "\016product_suites\030\001 \003(\013" + + "2-.google.cloud.productregistry.v1.ProductSuite\022\027\n" + + "\017next_page_token\030\002 \001(\t\"b\n" + + "\032ListLogicalProductsRequest\022\023\n" + + "\006filter\030\001 \001(\tB\003\340A\001\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"\201\001\n" + + "\033ListLogicalProductsResponse\022I\n" + + "\020logical_products\030\001 \003(\0132/.google." + + "cloud.productregistry.v1.LogicalProduct\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\247\001\n" + + "!ListLogicalProductVariantsRequest\022Q\n" + + "\006parent\030\001 \001(\tBA" + + "\340A\002\372A;\0229cloudproductregistry.googleapis.com/LogicalProductVariant\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"\227\001\n" + + "\"ListLogicalProductVariantsResponse\022X\n" + + "\030logical_product_variants\030\001 \003(\01326.google.clo" + + "ud.productregistry.v1.LogicalProductVariant\022\027\n" + + "\017next_page_token\030\002 \001(\t\".\n" + + "\023LookupEntityRequest\022\027\n\n" + + "lookup_uri\030\001 \001(\tB\003\340A\002\"\217\002\n" + + "\024LookupEntityResponse\022J\n" + + "\017logical_product\030\001" + + " \001(\0132/.google.cloud.productregistry.v1.LogicalProductH\000\022Y\n" + + "\027logical_product_variant\030\002" + + " \001(\01326.google.cloud.productregistry.v1.LogicalProductVariantH\000\022F\n\r" + + "product_suite\030\003" + + " \001(\0132-.google.cloud.productregistry.v1.ProductSuiteH\000B\010\n" + + "\006entity2\320\013\n" + + "\037CloudProductRegistryReadService\022\244\001\n" + + "\017GetProductSuite\0227.google.cloud.productregistry.v1" + + ".GetProductSuiteRequest\032-.google.cloud.p" + + "roductregistry.v1.ProductSuite\")\332A\004name\202\323\344\223\002\034\022\032/v1/{name=productSuites/*}\022\245\001\n" + + "\021ListProductSuites\0229.google.cloud.productre" + + "gistry.v1.ListProductSuitesRequest\032:.google.cloud.productregistry.v1.ListProduct" + + "SuitesResponse\"\031\202\323\344\223\002\023\022\021/v1/productSuites\022\254\001\n" + + "\021GetLogicalProduct\0229.google.cloud.productregistry.v1.GetLogicalProductReque" + + "st\032/.google.cloud.productregistry.v1.Log" + + "icalProduct\"+\332A\004name\202\323\344\223\002\036\022\034/v1/{name=logicalProducts/*}\022\255\001\n" + + "\023ListLogicalProducts\022;.google.cloud.productregistry.v1.ListL" + + "ogicalProductsRequest\032<.google.cloud.pro" + + "ductregistry.v1.ListLogicalProductsResponse\"\033\202\323\344\223\002\025\022\023/v1/logicalProducts\022\314\001\n" + + "\030GetLogicalProductVariant\022@.google.cloud.pro" + + "ductregistry.v1.GetLogicalProductVariantRequest\0326.google.cloud.productregistry.v" + + "1.LogicalProductVariant\"6\332A\004name\202\323\344\223\002)\022\'" + + "/v1/{name=logicalProducts/*/variants/*}\022\337\001\n" + + "\032ListLogicalProductVariants\022B.google.cloud.productregistry.v1.ListLogicalProd" + + "uctVariantsRequest\032C.google.cloud.productregistry.v1.ListLogicalProductVariantsR" + + "esponse\"8\332A\006parent\202\323\344\223\002)\022\'/v1/{parent=logicalProducts/*}/variants\022\245\002\n" + + "\014LookupEntity\0224.google.cloud.productregistry.v1.Loo" + + "kupEntityRequest\0325.google.cloud.productr" + + "egistry.v1.LookupEntityResponse\"\247\001\202\323\344\223\002\240" + + "\001\022//v1/{lookup_uri=logicalProducts/*}:lo" + + "okupEntityZ<\022:/v1/{lookup_uri=logicalProducts/*/variants/*}:lookupEntityZ/\022-/v1/" + + "{lookup_uri=productSuites/*}:lookupEntit" + + "y\032&\312A#cloudproductregistry.googleapis.comB\205\002\n" + + "#com.google.cloud.productregistry.v1B$CloudProductRegistryReadServiceProtoP" + + "\001ZMcloud.google.com/go/productregistry/apiv1/productregistrypb;productregistrypb" + + "\252\002\037Google.Cloud.ProductRegistry.V1\312\002\037Goo" + + "gle\\Cloud\\ProductRegistry\\V1\352\002\"Google::Cloud::ProductRegistry::V1b\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.productregistry.v1.LogicalProductProto.getDescriptor(), + com.google.cloud.productregistry.v1.LogicalProductVariantProto.getDescriptor(), + com.google.cloud.productregistry.v1.ProductSuiteProto.getDescriptor(), + }); + internal_static_google_cloud_productregistry_v1_GetProductSuiteRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_productregistry_v1_GetProductSuiteRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_productregistry_v1_GetProductSuiteRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_productregistry_v1_GetLogicalProductRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_productregistry_v1_GetLogicalProductRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_productregistry_v1_GetLogicalProductRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_productregistry_v1_GetLogicalProductVariantRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_productregistry_v1_GetLogicalProductVariantRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_productregistry_v1_GetLogicalProductVariantRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_productregistry_v1_ListProductSuitesRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_cloud_productregistry_v1_ListProductSuitesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_productregistry_v1_ListProductSuitesRequest_descriptor, + new java.lang.String[] { + "PageSize", "PageToken", + }); + internal_static_google_cloud_productregistry_v1_ListProductSuitesResponse_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_productregistry_v1_ListProductSuitesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_productregistry_v1_ListProductSuitesResponse_descriptor, + new java.lang.String[] { + "ProductSuites", "NextPageToken", + }); + internal_static_google_cloud_productregistry_v1_ListLogicalProductsRequest_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_productregistry_v1_ListLogicalProductsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_productregistry_v1_ListLogicalProductsRequest_descriptor, + new java.lang.String[] { + "Filter", "PageSize", "PageToken", + }); + internal_static_google_cloud_productregistry_v1_ListLogicalProductsResponse_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_productregistry_v1_ListLogicalProductsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_productregistry_v1_ListLogicalProductsResponse_descriptor, + new java.lang.String[] { + "LogicalProducts", "NextPageToken", + }); + internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsRequest_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsResponse_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsResponse_descriptor, + new java.lang.String[] { + "LogicalProductVariants", "NextPageToken", + }); + internal_static_google_cloud_productregistry_v1_LookupEntityRequest_descriptor = + getDescriptor().getMessageType(9); + internal_static_google_cloud_productregistry_v1_LookupEntityRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_productregistry_v1_LookupEntityRequest_descriptor, + new java.lang.String[] { + "LookupUri", + }); + internal_static_google_cloud_productregistry_v1_LookupEntityResponse_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_cloud_productregistry_v1_LookupEntityResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_productregistry_v1_LookupEntityResponse_descriptor, + new java.lang.String[] { + "LogicalProduct", "LogicalProductVariant", "ProductSuite", "Entity", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.productregistry.v1.LogicalProductProto.getDescriptor(); + com.google.cloud.productregistry.v1.LogicalProductVariantProto.getDescriptor(); + com.google.cloud.productregistry.v1.ProductSuiteProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetLogicalProductRequest.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetLogicalProductRequest.java new file mode 100644 index 000000000000..ffb75f40fad2 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetLogicalProductRequest.java @@ -0,0 +1,622 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +/** + * + * + *
+ * Request message for GetLogicalProduct.
+ * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.GetLogicalProductRequest} + */ +@com.google.protobuf.Generated +public final class GetLogicalProductRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.productregistry.v1.GetLogicalProductRequest) + GetLogicalProductRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetLogicalProductRequest"); + } + + // Use GetLogicalProductRequest.newBuilder() to construct. + private GetLogicalProductRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetLogicalProductRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_GetLogicalProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_GetLogicalProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.GetLogicalProductRequest.class, + com.google.cloud.productregistry.v1.GetLogicalProductRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the LogicalProduct to retrieve.
+   * Format: logicalProducts/{logical_product}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the LogicalProduct to retrieve.
+   * Format: logicalProducts/{logical_product}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.productregistry.v1.GetLogicalProductRequest)) { + return super.equals(obj); + } + com.google.cloud.productregistry.v1.GetLogicalProductRequest other = + (com.google.cloud.productregistry.v1.GetLogicalProductRequest) 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.productregistry.v1.GetLogicalProductRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.productregistry.v1.GetLogicalProductRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for GetLogicalProduct.
+   * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.GetLogicalProductRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.productregistry.v1.GetLogicalProductRequest) + com.google.cloud.productregistry.v1.GetLogicalProductRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_GetLogicalProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_GetLogicalProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.GetLogicalProductRequest.class, + com.google.cloud.productregistry.v1.GetLogicalProductRequest.Builder.class); + } + + // Construct using com.google.cloud.productregistry.v1.GetLogicalProductRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_GetLogicalProductRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.GetLogicalProductRequest + getDefaultInstanceForType() { + return com.google.cloud.productregistry.v1.GetLogicalProductRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.GetLogicalProductRequest build() { + com.google.cloud.productregistry.v1.GetLogicalProductRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.GetLogicalProductRequest buildPartial() { + com.google.cloud.productregistry.v1.GetLogicalProductRequest result = + new com.google.cloud.productregistry.v1.GetLogicalProductRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.productregistry.v1.GetLogicalProductRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.productregistry.v1.GetLogicalProductRequest) { + return mergeFrom((com.google.cloud.productregistry.v1.GetLogicalProductRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.productregistry.v1.GetLogicalProductRequest other) { + if (other + == com.google.cloud.productregistry.v1.GetLogicalProductRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the LogicalProduct to retrieve.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the LogicalProduct to retrieve.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the LogicalProduct to retrieve.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the LogicalProduct to retrieve.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the LogicalProduct to retrieve.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.productregistry.v1.GetLogicalProductRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.productregistry.v1.GetLogicalProductRequest) + private static final com.google.cloud.productregistry.v1.GetLogicalProductRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.productregistry.v1.GetLogicalProductRequest(); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetLogicalProductRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.GetLogicalProductRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetLogicalProductRequestOrBuilder.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetLogicalProductRequestOrBuilder.java new file mode 100644 index 000000000000..85f7c63aa71c --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetLogicalProductRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public interface GetLogicalProductRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.productregistry.v1.GetLogicalProductRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the LogicalProduct to retrieve.
+   * Format: logicalProducts/{logical_product}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the LogicalProduct to retrieve.
+   * Format: logicalProducts/{logical_product}
+   * 
+ * + * + * 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-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetLogicalProductVariantRequest.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetLogicalProductVariantRequest.java new file mode 100644 index 000000000000..2bfe90d6f11c --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetLogicalProductVariantRequest.java @@ -0,0 +1,629 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +/** + * + * + *
+ * Request message for GetLogicalProductVariant.
+ * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.GetLogicalProductVariantRequest} + */ +@com.google.protobuf.Generated +public final class GetLogicalProductVariantRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.productregistry.v1.GetLogicalProductVariantRequest) + GetLogicalProductVariantRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetLogicalProductVariantRequest"); + } + + // Use GetLogicalProductVariantRequest.newBuilder() to construct. + private GetLogicalProductVariantRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetLogicalProductVariantRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_GetLogicalProductVariantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_GetLogicalProductVariantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest.class, + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the LogicalProductVariant to retrieve.
+   * Format: logicalProducts/{logical_product}/variants/{variant}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the LogicalProductVariant to retrieve.
+   * Format: logicalProducts/{logical_product}/variants/{variant}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest)) { + return super.equals(obj); + } + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest other = + (com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest) 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.productregistry.v1.GetLogicalProductVariantRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for GetLogicalProductVariant.
+   * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.GetLogicalProductVariantRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.productregistry.v1.GetLogicalProductVariantRequest) + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_GetLogicalProductVariantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_GetLogicalProductVariantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest.class, + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest.Builder.class); + } + + // Construct using + // com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_GetLogicalProductVariantRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest + getDefaultInstanceForType() { + return com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest build() { + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest buildPartial() { + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest result = + new com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest) { + return mergeFrom( + (com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest other) { + if (other + == com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the LogicalProductVariant to retrieve.
+     * Format: logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the LogicalProductVariant to retrieve.
+     * Format: logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the LogicalProductVariant to retrieve.
+     * Format: logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the LogicalProductVariant to retrieve.
+     * Format: logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the LogicalProductVariant to retrieve.
+     * Format: logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.productregistry.v1.GetLogicalProductVariantRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.productregistry.v1.GetLogicalProductVariantRequest) + private static final com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest(); + } + + public static com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetLogicalProductVariantRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetLogicalProductVariantRequestOrBuilder.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetLogicalProductVariantRequestOrBuilder.java new file mode 100644 index 000000000000..11c9629d5671 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetLogicalProductVariantRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public interface GetLogicalProductVariantRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.productregistry.v1.GetLogicalProductVariantRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the LogicalProductVariant to retrieve.
+   * Format: logicalProducts/{logical_product}/variants/{variant}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the LogicalProductVariant to retrieve.
+   * Format: logicalProducts/{logical_product}/variants/{variant}
+   * 
+ * + * + * 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-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetProductSuiteRequest.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetProductSuiteRequest.java new file mode 100644 index 000000000000..8decb3ad1ee7 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetProductSuiteRequest.java @@ -0,0 +1,618 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +/** + * + * + *
+ * Request message for GetProductSuite.
+ * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.GetProductSuiteRequest} + */ +@com.google.protobuf.Generated +public final class GetProductSuiteRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.productregistry.v1.GetProductSuiteRequest) + GetProductSuiteRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetProductSuiteRequest"); + } + + // Use GetProductSuiteRequest.newBuilder() to construct. + private GetProductSuiteRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetProductSuiteRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_GetProductSuiteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_GetProductSuiteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.GetProductSuiteRequest.class, + com.google.cloud.productregistry.v1.GetProductSuiteRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the ProductSuite to retrieve.
+   * Format: productSuites/{product_suite}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the ProductSuite to retrieve.
+   * Format: productSuites/{product_suite}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.productregistry.v1.GetProductSuiteRequest)) { + return super.equals(obj); + } + com.google.cloud.productregistry.v1.GetProductSuiteRequest other = + (com.google.cloud.productregistry.v1.GetProductSuiteRequest) 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.productregistry.v1.GetProductSuiteRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.GetProductSuiteRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.GetProductSuiteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.GetProductSuiteRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.GetProductSuiteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.GetProductSuiteRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.GetProductSuiteRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.GetProductSuiteRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.GetProductSuiteRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.GetProductSuiteRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.GetProductSuiteRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.GetProductSuiteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.productregistry.v1.GetProductSuiteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for GetProductSuite.
+   * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.GetProductSuiteRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.productregistry.v1.GetProductSuiteRequest) + com.google.cloud.productregistry.v1.GetProductSuiteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_GetProductSuiteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_GetProductSuiteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.GetProductSuiteRequest.class, + com.google.cloud.productregistry.v1.GetProductSuiteRequest.Builder.class); + } + + // Construct using com.google.cloud.productregistry.v1.GetProductSuiteRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_GetProductSuiteRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.GetProductSuiteRequest getDefaultInstanceForType() { + return com.google.cloud.productregistry.v1.GetProductSuiteRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.GetProductSuiteRequest build() { + com.google.cloud.productregistry.v1.GetProductSuiteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.GetProductSuiteRequest buildPartial() { + com.google.cloud.productregistry.v1.GetProductSuiteRequest result = + new com.google.cloud.productregistry.v1.GetProductSuiteRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.productregistry.v1.GetProductSuiteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.productregistry.v1.GetProductSuiteRequest) { + return mergeFrom((com.google.cloud.productregistry.v1.GetProductSuiteRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.productregistry.v1.GetProductSuiteRequest other) { + if (other == com.google.cloud.productregistry.v1.GetProductSuiteRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the ProductSuite to retrieve.
+     * Format: productSuites/{product_suite}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the ProductSuite to retrieve.
+     * Format: productSuites/{product_suite}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the ProductSuite to retrieve.
+     * Format: productSuites/{product_suite}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the ProductSuite to retrieve.
+     * Format: productSuites/{product_suite}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the ProductSuite to retrieve.
+     * Format: productSuites/{product_suite}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.productregistry.v1.GetProductSuiteRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.productregistry.v1.GetProductSuiteRequest) + private static final com.google.cloud.productregistry.v1.GetProductSuiteRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.productregistry.v1.GetProductSuiteRequest(); + } + + public static com.google.cloud.productregistry.v1.GetProductSuiteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetProductSuiteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.GetProductSuiteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetProductSuiteRequestOrBuilder.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetProductSuiteRequestOrBuilder.java new file mode 100644 index 000000000000..02a52f76075c --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/GetProductSuiteRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public interface GetProductSuiteRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.productregistry.v1.GetProductSuiteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the ProductSuite to retrieve.
+   * Format: productSuites/{product_suite}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the ProductSuite to retrieve.
+   * Format: productSuites/{product_suite}
+   * 
+ * + * + * 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-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LifecycleState.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LifecycleState.java new file mode 100644 index 000000000000..0d968f7d1aed --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LifecycleState.java @@ -0,0 +1,247 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/lifecycle_state.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +/** + * + * + *
+ * Enum representing the lifecycle state of the underlying entity.
+ * 
+ * + * Protobuf enum {@code google.cloud.productregistry.v1.LifecycleState} + */ +@com.google.protobuf.Generated +public enum LifecycleState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The default value. This value is used if the lifecycle state is not set.
+   * 
+ * + * LIFECYCLE_STATE_UNSPECIFIED = 0; + */ + LIFECYCLE_STATE_UNSPECIFIED(0), + /** + * + * + *
+   * The entity is in Public Preview. It is available to all
+   * customers, but may not be feature-complete or have full support guarantees.
+   * 
+ * + * LIFECYCLE_STATE_PUBLIC_PREVIEW = 1; + */ + LIFECYCLE_STATE_PUBLIC_PREVIEW(1), + /** + * + * + *
+   * The entity is in Private General Availability. It is fully
+   * supported and stable, but only available to a select group of customers.
+   * 
+ * + * LIFECYCLE_STATE_PRIVATE_GA = 2; + */ + LIFECYCLE_STATE_PRIVATE_GA(2), + /** + * + * + *
+   * The entity is Generally Available. It is fully supported, stable, and
+   * available to all customers.
+   * 
+ * + * LIFECYCLE_STATE_GA = 3; + */ + LIFECYCLE_STATE_GA(3), + /** + * + * + *
+   * The entity is deprecated. It is no longer recommended for use
+   * and may be removed in a future version.
+   * 
+ * + * LIFECYCLE_STATE_DEPRECATED = 4; + */ + LIFECYCLE_STATE_DEPRECATED(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LifecycleState"); + } + + /** + * + * + *
+   * The default value. This value is used if the lifecycle state is not set.
+   * 
+ * + * LIFECYCLE_STATE_UNSPECIFIED = 0; + */ + public static final int LIFECYCLE_STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * The entity is in Public Preview. It is available to all
+   * customers, but may not be feature-complete or have full support guarantees.
+   * 
+ * + * LIFECYCLE_STATE_PUBLIC_PREVIEW = 1; + */ + public static final int LIFECYCLE_STATE_PUBLIC_PREVIEW_VALUE = 1; + + /** + * + * + *
+   * The entity is in Private General Availability. It is fully
+   * supported and stable, but only available to a select group of customers.
+   * 
+ * + * LIFECYCLE_STATE_PRIVATE_GA = 2; + */ + public static final int LIFECYCLE_STATE_PRIVATE_GA_VALUE = 2; + + /** + * + * + *
+   * The entity is Generally Available. It is fully supported, stable, and
+   * available to all customers.
+   * 
+ * + * LIFECYCLE_STATE_GA = 3; + */ + public static final int LIFECYCLE_STATE_GA_VALUE = 3; + + /** + * + * + *
+   * The entity is deprecated. It is no longer recommended for use
+   * and may be removed in a future version.
+   * 
+ * + * LIFECYCLE_STATE_DEPRECATED = 4; + */ + public static final int LIFECYCLE_STATE_DEPRECATED_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 LifecycleState 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 LifecycleState forNumber(int value) { + switch (value) { + case 0: + return LIFECYCLE_STATE_UNSPECIFIED; + case 1: + return LIFECYCLE_STATE_PUBLIC_PREVIEW; + case 2: + return LIFECYCLE_STATE_PRIVATE_GA; + case 3: + return LIFECYCLE_STATE_GA; + case 4: + return LIFECYCLE_STATE_DEPRECATED; + 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 LifecycleState findValueByNumber(int number) { + return LifecycleState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.productregistry.v1.LifecycleStateProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final LifecycleState[] VALUES = values(); + + public static LifecycleState 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 LifecycleState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.productregistry.v1.LifecycleState) +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LifecycleStateProto.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LifecycleStateProto.java new file mode 100644 index 000000000000..1a866ab50ad5 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LifecycleStateProto.java @@ -0,0 +1,72 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/lifecycle_state.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public final class LifecycleStateProto extends com.google.protobuf.GeneratedFile { + private LifecycleStateProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LifecycleStateProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n5google/cloud/productregistry/v1/lifecy" + + "cle_state.proto\022\037google.cloud.productreg" + + "istry.v1*\255\001\n\016LifecycleState\022\037\n\033LIFECYCLE" + + "_STATE_UNSPECIFIED\020\000\022\"\n\036LIFECYCLE_STATE_" + + "PUBLIC_PREVIEW\020\001\022\036\n\032LIFECYCLE_STATE_PRIV" + + "ATE_GA\020\002\022\026\n\022LIFECYCLE_STATE_GA\020\003\022\036\n\032LIFE" + + "CYCLE_STATE_DEPRECATED\020\004B\364\001\n#com.google." + + "cloud.productregistry.v1B\023LifecycleState" + + "ProtoP\001ZMcloud.google.com/go/productregi" + + "stry/apiv1/productregistrypb;productregi" + + "strypb\252\002\037Google.Cloud.ProductRegistry.V1" + + "\312\002\037Google\\Cloud\\ProductRegistry\\V1\352\002\"Goo" + + "gle::Cloud::ProductRegistry::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + descriptor.resolveAllFeaturesImmutable(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductVariantsRequest.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductVariantsRequest.java new file mode 100644 index 000000000000..123bdd431a1a --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductVariantsRequest.java @@ -0,0 +1,970 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +/** + * + * + *
+ * Request message for ListLogicalProductVariants.
+ * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.ListLogicalProductVariantsRequest} + */ +@com.google.protobuf.Generated +public final class ListLogicalProductVariantsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.productregistry.v1.ListLogicalProductVariantsRequest) + ListLogicalProductVariantsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListLogicalProductVariantsRequest"); + } + + // Use ListLogicalProductVariantsRequest.newBuilder() to construct. + private ListLogicalProductVariantsRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListLogicalProductVariantsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest.class, + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent logical product id.
+   * Format: logicalProducts/{logical_product}
+   * 
+ * + * + * 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. Parent logical product id.
+   * Format: logicalProducts/{logical_product}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of logical product variants to return. The
+   * service may return fewer than this value. If unspecified, at most 100
+   * logical product variants will be returned. The maximum value is 500; values
+   * above 500 will be coerced to 500.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListLogicalProductVariants` call. Provide this to retrieve the subsequent
+   * page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListLogicalProductVariants` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListLogicalProductVariants` call. Provide this to retrieve the subsequent
+   * page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListLogicalProductVariants` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest)) { + return super.equals(obj); + } + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest other = + (com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for ListLogicalProductVariants.
+   * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.ListLogicalProductVariantsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.productregistry.v1.ListLogicalProductVariantsRequest) + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest.class, + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest + getDefaultInstanceForType() { + return com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest build() { + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest buildPartial() { + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest result = + new com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest) { + return mergeFrom( + (com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest other) { + if (other + == com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent logical product id.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * 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. Parent logical product id.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * 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. Parent logical product id.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * 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. Parent logical product id.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * 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. Parent logical product id.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of logical product variants to return. The
+     * service may return fewer than this value. If unspecified, at most 100
+     * logical product variants will be returned. The maximum value is 500; values
+     * above 500 will be coerced to 500.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of logical product variants to return. The
+     * service may return fewer than this value. If unspecified, at most 100
+     * logical product variants will be returned. The maximum value is 500; values
+     * above 500 will be coerced to 500.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of logical product variants to return. The
+     * service may return fewer than this value. If unspecified, at most 100
+     * logical product variants will be returned. The maximum value is 500; values
+     * above 500 will be coerced to 500.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListLogicalProductVariants` call. Provide this to retrieve the subsequent
+     * page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListLogicalProductVariants` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListLogicalProductVariants` call. Provide this to retrieve the subsequent
+     * page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListLogicalProductVariants` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListLogicalProductVariants` call. Provide this to retrieve the subsequent
+     * page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListLogicalProductVariants` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListLogicalProductVariants` call. Provide this to retrieve the subsequent
+     * page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListLogicalProductVariants` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListLogicalProductVariants` call. Provide this to retrieve the subsequent
+     * page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListLogicalProductVariants` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.productregistry.v1.ListLogicalProductVariantsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.productregistry.v1.ListLogicalProductVariantsRequest) + private static final com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest(); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLogicalProductVariantsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductVariantsRequestOrBuilder.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductVariantsRequestOrBuilder.java new file mode 100644 index 000000000000..4e19e60c13ee --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductVariantsRequestOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public interface ListLogicalProductVariantsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.productregistry.v1.ListLogicalProductVariantsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent logical product id.
+   * Format: logicalProducts/{logical_product}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent logical product id.
+   * Format: logicalProducts/{logical_product}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of logical product variants to return. The
+   * service may return fewer than this value. If unspecified, at most 100
+   * logical product variants will be returned. The maximum value is 500; values
+   * above 500 will be coerced to 500.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListLogicalProductVariants` call. Provide this to retrieve the subsequent
+   * page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListLogicalProductVariants` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListLogicalProductVariants` call. Provide this to retrieve the subsequent
+   * page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListLogicalProductVariants` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductVariantsResponse.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductVariantsResponse.java new file mode 100644 index 000000000000..31d104e6e75d --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductVariantsResponse.java @@ -0,0 +1,1209 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +/** + * + * + *
+ * Response message for ListLogicalProductVariants.
+ * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.ListLogicalProductVariantsResponse} + */ +@com.google.protobuf.Generated +public final class ListLogicalProductVariantsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.productregistry.v1.ListLogicalProductVariantsResponse) + ListLogicalProductVariantsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListLogicalProductVariantsResponse"); + } + + // Use ListLogicalProductVariantsResponse.newBuilder() to construct. + private ListLogicalProductVariantsResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListLogicalProductVariantsResponse() { + logicalProductVariants_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse.class, + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse.Builder.class); + } + + public static final int LOGICAL_PRODUCT_VARIANTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + logicalProductVariants_; + + /** + * + * + *
+   * Matched LogicalProductVariants
+   * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + @java.lang.Override + public java.util.List + getLogicalProductVariantsList() { + return logicalProductVariants_; + } + + /** + * + * + *
+   * Matched LogicalProductVariants
+   * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.productregistry.v1.LogicalProductVariantOrBuilder> + getLogicalProductVariantsOrBuilderList() { + return logicalProductVariants_; + } + + /** + * + * + *
+   * Matched LogicalProductVariants
+   * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + @java.lang.Override + public int getLogicalProductVariantsCount() { + return logicalProductVariants_.size(); + } + + /** + * + * + *
+   * Matched LogicalProductVariants
+   * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProductVariant getLogicalProductVariants( + int index) { + return logicalProductVariants_.get(index); + } + + /** + * + * + *
+   * Matched LogicalProductVariants
+   * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProductVariantOrBuilder + getLogicalProductVariantsOrBuilder(int index) { + return logicalProductVariants_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < logicalProductVariants_.size(); i++) { + output.writeMessage(1, logicalProductVariants_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < logicalProductVariants_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, logicalProductVariants_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse)) { + return super.equals(obj); + } + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse other = + (com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse) obj; + + if (!getLogicalProductVariantsList().equals(other.getLogicalProductVariantsList())) + return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLogicalProductVariantsCount() > 0) { + hash = (37 * hash) + LOGICAL_PRODUCT_VARIANTS_FIELD_NUMBER; + hash = (53 * hash) + getLogicalProductVariantsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for ListLogicalProductVariants.
+   * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.ListLogicalProductVariantsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.productregistry.v1.ListLogicalProductVariantsResponse) + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse.class, + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (logicalProductVariantsBuilder_ == null) { + logicalProductVariants_ = java.util.Collections.emptyList(); + } else { + logicalProductVariants_ = null; + logicalProductVariantsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductVariantsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse + getDefaultInstanceForType() { + return com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse build() { + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse buildPartial() { + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse result = + new com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse result) { + if (logicalProductVariantsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + logicalProductVariants_ = java.util.Collections.unmodifiableList(logicalProductVariants_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.logicalProductVariants_ = logicalProductVariants_; + } else { + result.logicalProductVariants_ = logicalProductVariantsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse) { + return mergeFrom( + (com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse other) { + if (other + == com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse + .getDefaultInstance()) return this; + if (logicalProductVariantsBuilder_ == null) { + if (!other.logicalProductVariants_.isEmpty()) { + if (logicalProductVariants_.isEmpty()) { + logicalProductVariants_ = other.logicalProductVariants_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLogicalProductVariantsIsMutable(); + logicalProductVariants_.addAll(other.logicalProductVariants_); + } + onChanged(); + } + } else { + if (!other.logicalProductVariants_.isEmpty()) { + if (logicalProductVariantsBuilder_.isEmpty()) { + logicalProductVariantsBuilder_.dispose(); + logicalProductVariantsBuilder_ = null; + logicalProductVariants_ = other.logicalProductVariants_; + bitField0_ = (bitField0_ & ~0x00000001); + logicalProductVariantsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetLogicalProductVariantsFieldBuilder() + : null; + } else { + logicalProductVariantsBuilder_.addAllMessages(other.logicalProductVariants_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.productregistry.v1.LogicalProductVariant m = + input.readMessage( + com.google.cloud.productregistry.v1.LogicalProductVariant.parser(), + extensionRegistry); + if (logicalProductVariantsBuilder_ == null) { + ensureLogicalProductVariantsIsMutable(); + logicalProductVariants_.add(m); + } else { + logicalProductVariantsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + logicalProductVariants_ = java.util.Collections.emptyList(); + + private void ensureLogicalProductVariantsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + logicalProductVariants_ = + new java.util.ArrayList( + logicalProductVariants_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.productregistry.v1.LogicalProductVariant, + com.google.cloud.productregistry.v1.LogicalProductVariant.Builder, + com.google.cloud.productregistry.v1.LogicalProductVariantOrBuilder> + logicalProductVariantsBuilder_; + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public java.util.List + getLogicalProductVariantsList() { + if (logicalProductVariantsBuilder_ == null) { + return java.util.Collections.unmodifiableList(logicalProductVariants_); + } else { + return logicalProductVariantsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public int getLogicalProductVariantsCount() { + if (logicalProductVariantsBuilder_ == null) { + return logicalProductVariants_.size(); + } else { + return logicalProductVariantsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public com.google.cloud.productregistry.v1.LogicalProductVariant getLogicalProductVariants( + int index) { + if (logicalProductVariantsBuilder_ == null) { + return logicalProductVariants_.get(index); + } else { + return logicalProductVariantsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public Builder setLogicalProductVariants( + int index, com.google.cloud.productregistry.v1.LogicalProductVariant value) { + if (logicalProductVariantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalProductVariantsIsMutable(); + logicalProductVariants_.set(index, value); + onChanged(); + } else { + logicalProductVariantsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public Builder setLogicalProductVariants( + int index, + com.google.cloud.productregistry.v1.LogicalProductVariant.Builder builderForValue) { + if (logicalProductVariantsBuilder_ == null) { + ensureLogicalProductVariantsIsMutable(); + logicalProductVariants_.set(index, builderForValue.build()); + onChanged(); + } else { + logicalProductVariantsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public Builder addLogicalProductVariants( + com.google.cloud.productregistry.v1.LogicalProductVariant value) { + if (logicalProductVariantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalProductVariantsIsMutable(); + logicalProductVariants_.add(value); + onChanged(); + } else { + logicalProductVariantsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public Builder addLogicalProductVariants( + int index, com.google.cloud.productregistry.v1.LogicalProductVariant value) { + if (logicalProductVariantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalProductVariantsIsMutable(); + logicalProductVariants_.add(index, value); + onChanged(); + } else { + logicalProductVariantsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public Builder addLogicalProductVariants( + com.google.cloud.productregistry.v1.LogicalProductVariant.Builder builderForValue) { + if (logicalProductVariantsBuilder_ == null) { + ensureLogicalProductVariantsIsMutable(); + logicalProductVariants_.add(builderForValue.build()); + onChanged(); + } else { + logicalProductVariantsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public Builder addLogicalProductVariants( + int index, + com.google.cloud.productregistry.v1.LogicalProductVariant.Builder builderForValue) { + if (logicalProductVariantsBuilder_ == null) { + ensureLogicalProductVariantsIsMutable(); + logicalProductVariants_.add(index, builderForValue.build()); + onChanged(); + } else { + logicalProductVariantsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public Builder addAllLogicalProductVariants( + java.lang.Iterable + values) { + if (logicalProductVariantsBuilder_ == null) { + ensureLogicalProductVariantsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, logicalProductVariants_); + onChanged(); + } else { + logicalProductVariantsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public Builder clearLogicalProductVariants() { + if (logicalProductVariantsBuilder_ == null) { + logicalProductVariants_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + logicalProductVariantsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public Builder removeLogicalProductVariants(int index) { + if (logicalProductVariantsBuilder_ == null) { + ensureLogicalProductVariantsIsMutable(); + logicalProductVariants_.remove(index); + onChanged(); + } else { + logicalProductVariantsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public com.google.cloud.productregistry.v1.LogicalProductVariant.Builder + getLogicalProductVariantsBuilder(int index) { + return internalGetLogicalProductVariantsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public com.google.cloud.productregistry.v1.LogicalProductVariantOrBuilder + getLogicalProductVariantsOrBuilder(int index) { + if (logicalProductVariantsBuilder_ == null) { + return logicalProductVariants_.get(index); + } else { + return logicalProductVariantsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.productregistry.v1.LogicalProductVariantOrBuilder> + getLogicalProductVariantsOrBuilderList() { + if (logicalProductVariantsBuilder_ != null) { + return logicalProductVariantsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logicalProductVariants_); + } + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public com.google.cloud.productregistry.v1.LogicalProductVariant.Builder + addLogicalProductVariantsBuilder() { + return internalGetLogicalProductVariantsFieldBuilder() + .addBuilder( + com.google.cloud.productregistry.v1.LogicalProductVariant.getDefaultInstance()); + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public com.google.cloud.productregistry.v1.LogicalProductVariant.Builder + addLogicalProductVariantsBuilder(int index) { + return internalGetLogicalProductVariantsFieldBuilder() + .addBuilder( + index, + com.google.cloud.productregistry.v1.LogicalProductVariant.getDefaultInstance()); + } + + /** + * + * + *
+     * Matched LogicalProductVariants
+     * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + public java.util.List + getLogicalProductVariantsBuilderList() { + return internalGetLogicalProductVariantsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.productregistry.v1.LogicalProductVariant, + com.google.cloud.productregistry.v1.LogicalProductVariant.Builder, + com.google.cloud.productregistry.v1.LogicalProductVariantOrBuilder> + internalGetLogicalProductVariantsFieldBuilder() { + if (logicalProductVariantsBuilder_ == null) { + logicalProductVariantsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.productregistry.v1.LogicalProductVariant, + com.google.cloud.productregistry.v1.LogicalProductVariant.Builder, + com.google.cloud.productregistry.v1.LogicalProductVariantOrBuilder>( + logicalProductVariants_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + logicalProductVariants_ = null; + } + return logicalProductVariantsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.productregistry.v1.ListLogicalProductVariantsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.productregistry.v1.ListLogicalProductVariantsResponse) + private static final com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse(); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLogicalProductVariantsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductVariantsResponseOrBuilder.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductVariantsResponseOrBuilder.java new file mode 100644 index 000000000000..9ee30b527576 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductVariantsResponseOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public interface ListLogicalProductVariantsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.productregistry.v1.ListLogicalProductVariantsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Matched LogicalProductVariants
+   * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + java.util.List + getLogicalProductVariantsList(); + + /** + * + * + *
+   * Matched LogicalProductVariants
+   * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + com.google.cloud.productregistry.v1.LogicalProductVariant getLogicalProductVariants(int index); + + /** + * + * + *
+   * Matched LogicalProductVariants
+   * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + int getLogicalProductVariantsCount(); + + /** + * + * + *
+   * Matched LogicalProductVariants
+   * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + java.util.List + getLogicalProductVariantsOrBuilderList(); + + /** + * + * + *
+   * Matched LogicalProductVariants
+   * 
+ * + * + * repeated .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variants = 1; + * + */ + com.google.cloud.productregistry.v1.LogicalProductVariantOrBuilder + getLogicalProductVariantsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductsRequest.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductsRequest.java new file mode 100644 index 000000000000..c724a274b077 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductsRequest.java @@ -0,0 +1,943 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +/** + * + * + *
+ * Request message for ListLogicalProducts.
+ * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.ListLogicalProductsRequest} + */ +@com.google.protobuf.Generated +public final class ListLogicalProductsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.productregistry.v1.ListLogicalProductsRequest) + ListLogicalProductsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListLogicalProductsRequest"); + } + + // Use ListLogicalProductsRequest.newBuilder() to construct. + private ListLogicalProductsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListLogicalProductsRequest() { + filter_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.ListLogicalProductsRequest.class, + com.google.cloud.productregistry.v1.ListLogicalProductsRequest.Builder.class); + } + + public static final int FILTER_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. The filter expression for listing logical products.
+   * Filter syntax: https://google.aip.dev/160
+   * Supported fields: suite_id
+   * 
+ * + * string filter = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The filter expression for listing logical products.
+   * Filter syntax: https://google.aip.dev/160
+   * Supported fields: suite_id
+   * 
+ * + * string filter = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of logical products to return. The service may
+   * return fewer than this value. If unspecified, at most 100 logical products
+   * will be returned. The maximum value is 500; values above 500 will be
+   * coerced to 500.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListLogicalProducts`
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListLogicalProducts`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListLogicalProducts`
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListLogicalProducts`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.productregistry.v1.ListLogicalProductsRequest)) { + return super.equals(obj); + } + com.google.cloud.productregistry.v1.ListLogicalProductsRequest other = + (com.google.cloud.productregistry.v1.ListLogicalProductsRequest) obj; + + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.productregistry.v1.ListLogicalProductsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for ListLogicalProducts.
+   * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.ListLogicalProductsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.productregistry.v1.ListLogicalProductsRequest) + com.google.cloud.productregistry.v1.ListLogicalProductsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.ListLogicalProductsRequest.class, + com.google.cloud.productregistry.v1.ListLogicalProductsRequest.Builder.class); + } + + // Construct using com.google.cloud.productregistry.v1.ListLogicalProductsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListLogicalProductsRequest + getDefaultInstanceForType() { + return com.google.cloud.productregistry.v1.ListLogicalProductsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListLogicalProductsRequest build() { + com.google.cloud.productregistry.v1.ListLogicalProductsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListLogicalProductsRequest buildPartial() { + com.google.cloud.productregistry.v1.ListLogicalProductsRequest result = + new com.google.cloud.productregistry.v1.ListLogicalProductsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.productregistry.v1.ListLogicalProductsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.productregistry.v1.ListLogicalProductsRequest) { + return mergeFrom((com.google.cloud.productregistry.v1.ListLogicalProductsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.productregistry.v1.ListLogicalProductsRequest other) { + if (other + == com.google.cloud.productregistry.v1.ListLogicalProductsRequest.getDefaultInstance()) + return this; + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. The filter expression for listing logical products.
+     * Filter syntax: https://google.aip.dev/160
+     * Supported fields: suite_id
+     * 
+ * + * string filter = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The filter expression for listing logical products.
+     * Filter syntax: https://google.aip.dev/160
+     * Supported fields: suite_id
+     * 
+ * + * string filter = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The filter expression for listing logical products.
+     * Filter syntax: https://google.aip.dev/160
+     * Supported fields: suite_id
+     * 
+ * + * string filter = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The filter expression for listing logical products.
+     * Filter syntax: https://google.aip.dev/160
+     * Supported fields: suite_id
+     * 
+ * + * string filter = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The filter expression for listing logical products.
+     * Filter syntax: https://google.aip.dev/160
+     * Supported fields: suite_id
+     * 
+ * + * string filter = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of logical products to return. The service may
+     * return fewer than this value. If unspecified, at most 100 logical products
+     * will be returned. The maximum value is 500; values above 500 will be
+     * coerced to 500.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of logical products to return. The service may
+     * return fewer than this value. If unspecified, at most 100 logical products
+     * will be returned. The maximum value is 500; values above 500 will be
+     * coerced to 500.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of logical products to return. The service may
+     * return fewer than this value. If unspecified, at most 100 logical products
+     * will be returned. The maximum value is 500; values above 500 will be
+     * coerced to 500.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListLogicalProducts`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListLogicalProducts`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListLogicalProducts`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListLogicalProducts`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListLogicalProducts`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListLogicalProducts`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListLogicalProducts`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListLogicalProducts`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListLogicalProducts`
+     * call. Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListLogicalProducts`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.productregistry.v1.ListLogicalProductsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.productregistry.v1.ListLogicalProductsRequest) + private static final com.google.cloud.productregistry.v1.ListLogicalProductsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.productregistry.v1.ListLogicalProductsRequest(); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLogicalProductsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListLogicalProductsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductsRequestOrBuilder.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductsRequestOrBuilder.java new file mode 100644 index 000000000000..0f4d4d3f42b9 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductsRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public interface ListLogicalProductsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.productregistry.v1.ListLogicalProductsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The filter expression for listing logical products.
+   * Filter syntax: https://google.aip.dev/160
+   * Supported fields: suite_id
+   * 
+ * + * string filter = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. The filter expression for listing logical products.
+   * Filter syntax: https://google.aip.dev/160
+   * Supported fields: suite_id
+   * 
+ * + * string filter = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. The maximum number of logical products to return. The service may
+   * return fewer than this value. If unspecified, at most 100 logical products
+   * will be returned. The maximum value is 500; values above 500 will be
+   * coerced to 500.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListLogicalProducts`
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListLogicalProducts`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListLogicalProducts`
+   * call. Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListLogicalProducts`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductsResponse.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductsResponse.java new file mode 100644 index 000000000000..901bead1b66d --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductsResponse.java @@ -0,0 +1,1142 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +/** + * + * + *
+ * Response message for ListLogicalProducts.
+ * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.ListLogicalProductsResponse} + */ +@com.google.protobuf.Generated +public final class ListLogicalProductsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.productregistry.v1.ListLogicalProductsResponse) + ListLogicalProductsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListLogicalProductsResponse"); + } + + // Use ListLogicalProductsResponse.newBuilder() to construct. + private ListLogicalProductsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListLogicalProductsResponse() { + logicalProducts_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.ListLogicalProductsResponse.class, + com.google.cloud.productregistry.v1.ListLogicalProductsResponse.Builder.class); + } + + public static final int LOGICAL_PRODUCTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List logicalProducts_; + + /** + * + * + *
+   * Matched LogicalProducts
+   * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + @java.lang.Override + public java.util.List + getLogicalProductsList() { + return logicalProducts_; + } + + /** + * + * + *
+   * Matched LogicalProducts
+   * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + @java.lang.Override + public java.util.List + getLogicalProductsOrBuilderList() { + return logicalProducts_; + } + + /** + * + * + *
+   * Matched LogicalProducts
+   * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + @java.lang.Override + public int getLogicalProductsCount() { + return logicalProducts_.size(); + } + + /** + * + * + *
+   * Matched LogicalProducts
+   * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProduct getLogicalProducts(int index) { + return logicalProducts_.get(index); + } + + /** + * + * + *
+   * Matched LogicalProducts
+   * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProductOrBuilder getLogicalProductsOrBuilder( + int index) { + return logicalProducts_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < logicalProducts_.size(); i++) { + output.writeMessage(1, logicalProducts_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < logicalProducts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, logicalProducts_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.productregistry.v1.ListLogicalProductsResponse)) { + return super.equals(obj); + } + com.google.cloud.productregistry.v1.ListLogicalProductsResponse other = + (com.google.cloud.productregistry.v1.ListLogicalProductsResponse) obj; + + if (!getLogicalProductsList().equals(other.getLogicalProductsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLogicalProductsCount() > 0) { + hash = (37 * hash) + LOGICAL_PRODUCTS_FIELD_NUMBER; + hash = (53 * hash) + getLogicalProductsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.productregistry.v1.ListLogicalProductsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for ListLogicalProducts.
+   * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.ListLogicalProductsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.productregistry.v1.ListLogicalProductsResponse) + com.google.cloud.productregistry.v1.ListLogicalProductsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.ListLogicalProductsResponse.class, + com.google.cloud.productregistry.v1.ListLogicalProductsResponse.Builder.class); + } + + // Construct using com.google.cloud.productregistry.v1.ListLogicalProductsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (logicalProductsBuilder_ == null) { + logicalProducts_ = java.util.Collections.emptyList(); + } else { + logicalProducts_ = null; + logicalProductsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListLogicalProductsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListLogicalProductsResponse + getDefaultInstanceForType() { + return com.google.cloud.productregistry.v1.ListLogicalProductsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListLogicalProductsResponse build() { + com.google.cloud.productregistry.v1.ListLogicalProductsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListLogicalProductsResponse buildPartial() { + com.google.cloud.productregistry.v1.ListLogicalProductsResponse result = + new com.google.cloud.productregistry.v1.ListLogicalProductsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.productregistry.v1.ListLogicalProductsResponse result) { + if (logicalProductsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + logicalProducts_ = java.util.Collections.unmodifiableList(logicalProducts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.logicalProducts_ = logicalProducts_; + } else { + result.logicalProducts_ = logicalProductsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.productregistry.v1.ListLogicalProductsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.productregistry.v1.ListLogicalProductsResponse) { + return mergeFrom((com.google.cloud.productregistry.v1.ListLogicalProductsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.productregistry.v1.ListLogicalProductsResponse other) { + if (other + == com.google.cloud.productregistry.v1.ListLogicalProductsResponse.getDefaultInstance()) + return this; + if (logicalProductsBuilder_ == null) { + if (!other.logicalProducts_.isEmpty()) { + if (logicalProducts_.isEmpty()) { + logicalProducts_ = other.logicalProducts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLogicalProductsIsMutable(); + logicalProducts_.addAll(other.logicalProducts_); + } + onChanged(); + } + } else { + if (!other.logicalProducts_.isEmpty()) { + if (logicalProductsBuilder_.isEmpty()) { + logicalProductsBuilder_.dispose(); + logicalProductsBuilder_ = null; + logicalProducts_ = other.logicalProducts_; + bitField0_ = (bitField0_ & ~0x00000001); + logicalProductsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetLogicalProductsFieldBuilder() + : null; + } else { + logicalProductsBuilder_.addAllMessages(other.logicalProducts_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.productregistry.v1.LogicalProduct m = + input.readMessage( + com.google.cloud.productregistry.v1.LogicalProduct.parser(), + extensionRegistry); + if (logicalProductsBuilder_ == null) { + ensureLogicalProductsIsMutable(); + logicalProducts_.add(m); + } else { + logicalProductsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List logicalProducts_ = + java.util.Collections.emptyList(); + + private void ensureLogicalProductsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + logicalProducts_ = + new java.util.ArrayList( + logicalProducts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.productregistry.v1.LogicalProduct, + com.google.cloud.productregistry.v1.LogicalProduct.Builder, + com.google.cloud.productregistry.v1.LogicalProductOrBuilder> + logicalProductsBuilder_; + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public java.util.List + getLogicalProductsList() { + if (logicalProductsBuilder_ == null) { + return java.util.Collections.unmodifiableList(logicalProducts_); + } else { + return logicalProductsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public int getLogicalProductsCount() { + if (logicalProductsBuilder_ == null) { + return logicalProducts_.size(); + } else { + return logicalProductsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public com.google.cloud.productregistry.v1.LogicalProduct getLogicalProducts(int index) { + if (logicalProductsBuilder_ == null) { + return logicalProducts_.get(index); + } else { + return logicalProductsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public Builder setLogicalProducts( + int index, com.google.cloud.productregistry.v1.LogicalProduct value) { + if (logicalProductsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalProductsIsMutable(); + logicalProducts_.set(index, value); + onChanged(); + } else { + logicalProductsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public Builder setLogicalProducts( + int index, com.google.cloud.productregistry.v1.LogicalProduct.Builder builderForValue) { + if (logicalProductsBuilder_ == null) { + ensureLogicalProductsIsMutable(); + logicalProducts_.set(index, builderForValue.build()); + onChanged(); + } else { + logicalProductsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public Builder addLogicalProducts(com.google.cloud.productregistry.v1.LogicalProduct value) { + if (logicalProductsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalProductsIsMutable(); + logicalProducts_.add(value); + onChanged(); + } else { + logicalProductsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public Builder addLogicalProducts( + int index, com.google.cloud.productregistry.v1.LogicalProduct value) { + if (logicalProductsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalProductsIsMutable(); + logicalProducts_.add(index, value); + onChanged(); + } else { + logicalProductsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public Builder addLogicalProducts( + com.google.cloud.productregistry.v1.LogicalProduct.Builder builderForValue) { + if (logicalProductsBuilder_ == null) { + ensureLogicalProductsIsMutable(); + logicalProducts_.add(builderForValue.build()); + onChanged(); + } else { + logicalProductsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public Builder addLogicalProducts( + int index, com.google.cloud.productregistry.v1.LogicalProduct.Builder builderForValue) { + if (logicalProductsBuilder_ == null) { + ensureLogicalProductsIsMutable(); + logicalProducts_.add(index, builderForValue.build()); + onChanged(); + } else { + logicalProductsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public Builder addAllLogicalProducts( + java.lang.Iterable values) { + if (logicalProductsBuilder_ == null) { + ensureLogicalProductsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, logicalProducts_); + onChanged(); + } else { + logicalProductsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public Builder clearLogicalProducts() { + if (logicalProductsBuilder_ == null) { + logicalProducts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + logicalProductsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public Builder removeLogicalProducts(int index) { + if (logicalProductsBuilder_ == null) { + ensureLogicalProductsIsMutable(); + logicalProducts_.remove(index); + onChanged(); + } else { + logicalProductsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public com.google.cloud.productregistry.v1.LogicalProduct.Builder getLogicalProductsBuilder( + int index) { + return internalGetLogicalProductsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public com.google.cloud.productregistry.v1.LogicalProductOrBuilder getLogicalProductsOrBuilder( + int index) { + if (logicalProductsBuilder_ == null) { + return logicalProducts_.get(index); + } else { + return logicalProductsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public java.util.List + getLogicalProductsOrBuilderList() { + if (logicalProductsBuilder_ != null) { + return logicalProductsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logicalProducts_); + } + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public com.google.cloud.productregistry.v1.LogicalProduct.Builder addLogicalProductsBuilder() { + return internalGetLogicalProductsFieldBuilder() + .addBuilder(com.google.cloud.productregistry.v1.LogicalProduct.getDefaultInstance()); + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public com.google.cloud.productregistry.v1.LogicalProduct.Builder addLogicalProductsBuilder( + int index) { + return internalGetLogicalProductsFieldBuilder() + .addBuilder( + index, com.google.cloud.productregistry.v1.LogicalProduct.getDefaultInstance()); + } + + /** + * + * + *
+     * Matched LogicalProducts
+     * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + public java.util.List + getLogicalProductsBuilderList() { + return internalGetLogicalProductsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.productregistry.v1.LogicalProduct, + com.google.cloud.productregistry.v1.LogicalProduct.Builder, + com.google.cloud.productregistry.v1.LogicalProductOrBuilder> + internalGetLogicalProductsFieldBuilder() { + if (logicalProductsBuilder_ == null) { + logicalProductsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.productregistry.v1.LogicalProduct, + com.google.cloud.productregistry.v1.LogicalProduct.Builder, + com.google.cloud.productregistry.v1.LogicalProductOrBuilder>( + logicalProducts_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + logicalProducts_ = null; + } + return logicalProductsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.productregistry.v1.ListLogicalProductsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.productregistry.v1.ListLogicalProductsResponse) + private static final com.google.cloud.productregistry.v1.ListLogicalProductsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.productregistry.v1.ListLogicalProductsResponse(); + } + + public static com.google.cloud.productregistry.v1.ListLogicalProductsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLogicalProductsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListLogicalProductsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductsResponseOrBuilder.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductsResponseOrBuilder.java new file mode 100644 index 000000000000..21b208537ca4 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListLogicalProductsResponseOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public interface ListLogicalProductsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.productregistry.v1.ListLogicalProductsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Matched LogicalProducts
+   * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + java.util.List getLogicalProductsList(); + + /** + * + * + *
+   * Matched LogicalProducts
+   * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + com.google.cloud.productregistry.v1.LogicalProduct getLogicalProducts(int index); + + /** + * + * + *
+   * Matched LogicalProducts
+   * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + int getLogicalProductsCount(); + + /** + * + * + *
+   * Matched LogicalProducts
+   * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + java.util.List + getLogicalProductsOrBuilderList(); + + /** + * + * + *
+   * Matched LogicalProducts
+   * 
+ * + * repeated .google.cloud.productregistry.v1.LogicalProduct logical_products = 1; + */ + com.google.cloud.productregistry.v1.LogicalProductOrBuilder getLogicalProductsOrBuilder( + int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListProductSuitesRequest.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListProductSuitesRequest.java new file mode 100644 index 000000000000..b9ac27c371af --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListProductSuitesRequest.java @@ -0,0 +1,734 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +/** + * + * + *
+ * Request message for ListProductSuites.
+ * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.ListProductSuitesRequest} + */ +@com.google.protobuf.Generated +public final class ListProductSuitesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.productregistry.v1.ListProductSuitesRequest) + ListProductSuitesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListProductSuitesRequest"); + } + + // Use ListProductSuitesRequest.newBuilder() to construct. + private ListProductSuitesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListProductSuitesRequest() { + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListProductSuitesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListProductSuitesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.ListProductSuitesRequest.class, + com.google.cloud.productregistry.v1.ListProductSuitesRequest.Builder.class); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 1; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of suites to return. The service may return
+   * fewer than this value. If unspecified, at most 100 suites will be returned.
+   * The maximum value is 500; values above 500 will be coerced to 500.
+   * 
+ * + * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListProductSuites` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListProductSuites` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListProductSuites` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListProductSuites` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (pageSize_ != 0) { + output.writeInt32(1, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.productregistry.v1.ListProductSuitesRequest)) { + return super.equals(obj); + } + com.google.cloud.productregistry.v1.ListProductSuitesRequest other = + (com.google.cloud.productregistry.v1.ListProductSuitesRequest) obj; + + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.productregistry.v1.ListProductSuitesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for ListProductSuites.
+   * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.ListProductSuitesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.productregistry.v1.ListProductSuitesRequest) + com.google.cloud.productregistry.v1.ListProductSuitesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListProductSuitesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListProductSuitesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.ListProductSuitesRequest.class, + com.google.cloud.productregistry.v1.ListProductSuitesRequest.Builder.class); + } + + // Construct using com.google.cloud.productregistry.v1.ListProductSuitesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListProductSuitesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListProductSuitesRequest + getDefaultInstanceForType() { + return com.google.cloud.productregistry.v1.ListProductSuitesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListProductSuitesRequest build() { + com.google.cloud.productregistry.v1.ListProductSuitesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListProductSuitesRequest buildPartial() { + com.google.cloud.productregistry.v1.ListProductSuitesRequest result = + new com.google.cloud.productregistry.v1.ListProductSuitesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.productregistry.v1.ListProductSuitesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.productregistry.v1.ListProductSuitesRequest) { + return mergeFrom((com.google.cloud.productregistry.v1.ListProductSuitesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.productregistry.v1.ListProductSuitesRequest other) { + if (other + == com.google.cloud.productregistry.v1.ListProductSuitesRequest.getDefaultInstance()) + return this; + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + 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: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + pageToken_ = 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 pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of suites to return. The service may return
+     * fewer than this value. If unspecified, at most 100 suites will be returned.
+     * The maximum value is 500; values above 500 will be coerced to 500.
+     * 
+ * + * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of suites to return. The service may return
+     * fewer than this value. If unspecified, at most 100 suites will be returned.
+     * The maximum value is 500; values above 500 will be coerced to 500.
+     * 
+ * + * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of suites to return. The service may return
+     * fewer than this value. If unspecified, at most 100 suites will be returned.
+     * The maximum value is 500; values above 500 will be coerced to 500.
+     * 
+ * + * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000001); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListProductSuites` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListProductSuites` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListProductSuites` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListProductSuites` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListProductSuites` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListProductSuites` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListProductSuites` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListProductSuites` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListProductSuites` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListProductSuites` must
+     * match the call that provided the page token.
+     * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.productregistry.v1.ListProductSuitesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.productregistry.v1.ListProductSuitesRequest) + private static final com.google.cloud.productregistry.v1.ListProductSuitesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.productregistry.v1.ListProductSuitesRequest(); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductSuitesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListProductSuitesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListProductSuitesRequestOrBuilder.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListProductSuitesRequestOrBuilder.java new file mode 100644 index 000000000000..9c2ad8e888bb --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListProductSuitesRequestOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public interface ListProductSuitesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.productregistry.v1.ListProductSuitesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The maximum number of suites to return. The service may return
+   * fewer than this value. If unspecified, at most 100 suites will be returned.
+   * The maximum value is 500; values above 500 will be coerced to 500.
+   * 
+ * + * int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListProductSuites` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListProductSuites` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListProductSuites` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListProductSuites` must
+   * match the call that provided the page token.
+   * 
+ * + * string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListProductSuitesResponse.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListProductSuitesResponse.java new file mode 100644 index 000000000000..4218186ab2f1 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListProductSuitesResponse.java @@ -0,0 +1,1136 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +/** + * + * + *
+ * Response message for ListProductSuites.
+ * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.ListProductSuitesResponse} + */ +@com.google.protobuf.Generated +public final class ListProductSuitesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.productregistry.v1.ListProductSuitesResponse) + ListProductSuitesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListProductSuitesResponse"); + } + + // Use ListProductSuitesResponse.newBuilder() to construct. + private ListProductSuitesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListProductSuitesResponse() { + productSuites_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListProductSuitesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListProductSuitesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.ListProductSuitesResponse.class, + com.google.cloud.productregistry.v1.ListProductSuitesResponse.Builder.class); + } + + public static final int PRODUCT_SUITES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List productSuites_; + + /** + * + * + *
+   * Matched ProductSuites
+   * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + @java.lang.Override + public java.util.List getProductSuitesList() { + return productSuites_; + } + + /** + * + * + *
+   * Matched ProductSuites
+   * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + @java.lang.Override + public java.util.List + getProductSuitesOrBuilderList() { + return productSuites_; + } + + /** + * + * + *
+   * Matched ProductSuites
+   * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + @java.lang.Override + public int getProductSuitesCount() { + return productSuites_.size(); + } + + /** + * + * + *
+   * Matched ProductSuites
+   * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.ProductSuite getProductSuites(int index) { + return productSuites_.get(index); + } + + /** + * + * + *
+   * Matched ProductSuites
+   * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.ProductSuiteOrBuilder getProductSuitesOrBuilder( + int index) { + return productSuites_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < productSuites_.size(); i++) { + output.writeMessage(1, productSuites_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < productSuites_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, productSuites_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.productregistry.v1.ListProductSuitesResponse)) { + return super.equals(obj); + } + com.google.cloud.productregistry.v1.ListProductSuitesResponse other = + (com.google.cloud.productregistry.v1.ListProductSuitesResponse) obj; + + if (!getProductSuitesList().equals(other.getProductSuitesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProductSuitesCount() > 0) { + hash = (37 * hash) + PRODUCT_SUITES_FIELD_NUMBER; + hash = (53 * hash) + getProductSuitesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.productregistry.v1.ListProductSuitesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for ListProductSuites.
+   * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.ListProductSuitesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.productregistry.v1.ListProductSuitesResponse) + com.google.cloud.productregistry.v1.ListProductSuitesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListProductSuitesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListProductSuitesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.ListProductSuitesResponse.class, + com.google.cloud.productregistry.v1.ListProductSuitesResponse.Builder.class); + } + + // Construct using com.google.cloud.productregistry.v1.ListProductSuitesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (productSuitesBuilder_ == null) { + productSuites_ = java.util.Collections.emptyList(); + } else { + productSuites_ = null; + productSuitesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_ListProductSuitesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListProductSuitesResponse + getDefaultInstanceForType() { + return com.google.cloud.productregistry.v1.ListProductSuitesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListProductSuitesResponse build() { + com.google.cloud.productregistry.v1.ListProductSuitesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListProductSuitesResponse buildPartial() { + com.google.cloud.productregistry.v1.ListProductSuitesResponse result = + new com.google.cloud.productregistry.v1.ListProductSuitesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.productregistry.v1.ListProductSuitesResponse result) { + if (productSuitesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + productSuites_ = java.util.Collections.unmodifiableList(productSuites_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.productSuites_ = productSuites_; + } else { + result.productSuites_ = productSuitesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.productregistry.v1.ListProductSuitesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.productregistry.v1.ListProductSuitesResponse) { + return mergeFrom((com.google.cloud.productregistry.v1.ListProductSuitesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.productregistry.v1.ListProductSuitesResponse other) { + if (other + == com.google.cloud.productregistry.v1.ListProductSuitesResponse.getDefaultInstance()) + return this; + if (productSuitesBuilder_ == null) { + if (!other.productSuites_.isEmpty()) { + if (productSuites_.isEmpty()) { + productSuites_ = other.productSuites_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductSuitesIsMutable(); + productSuites_.addAll(other.productSuites_); + } + onChanged(); + } + } else { + if (!other.productSuites_.isEmpty()) { + if (productSuitesBuilder_.isEmpty()) { + productSuitesBuilder_.dispose(); + productSuitesBuilder_ = null; + productSuites_ = other.productSuites_; + bitField0_ = (bitField0_ & ~0x00000001); + productSuitesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetProductSuitesFieldBuilder() + : null; + } else { + productSuitesBuilder_.addAllMessages(other.productSuites_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.productregistry.v1.ProductSuite m = + input.readMessage( + com.google.cloud.productregistry.v1.ProductSuite.parser(), + extensionRegistry); + if (productSuitesBuilder_ == null) { + ensureProductSuitesIsMutable(); + productSuites_.add(m); + } else { + productSuitesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List productSuites_ = + java.util.Collections.emptyList(); + + private void ensureProductSuitesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + productSuites_ = + new java.util.ArrayList( + productSuites_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.productregistry.v1.ProductSuite, + com.google.cloud.productregistry.v1.ProductSuite.Builder, + com.google.cloud.productregistry.v1.ProductSuiteOrBuilder> + productSuitesBuilder_; + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public java.util.List getProductSuitesList() { + if (productSuitesBuilder_ == null) { + return java.util.Collections.unmodifiableList(productSuites_); + } else { + return productSuitesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public int getProductSuitesCount() { + if (productSuitesBuilder_ == null) { + return productSuites_.size(); + } else { + return productSuitesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public com.google.cloud.productregistry.v1.ProductSuite getProductSuites(int index) { + if (productSuitesBuilder_ == null) { + return productSuites_.get(index); + } else { + return productSuitesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public Builder setProductSuites( + int index, com.google.cloud.productregistry.v1.ProductSuite value) { + if (productSuitesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductSuitesIsMutable(); + productSuites_.set(index, value); + onChanged(); + } else { + productSuitesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public Builder setProductSuites( + int index, com.google.cloud.productregistry.v1.ProductSuite.Builder builderForValue) { + if (productSuitesBuilder_ == null) { + ensureProductSuitesIsMutable(); + productSuites_.set(index, builderForValue.build()); + onChanged(); + } else { + productSuitesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public Builder addProductSuites(com.google.cloud.productregistry.v1.ProductSuite value) { + if (productSuitesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductSuitesIsMutable(); + productSuites_.add(value); + onChanged(); + } else { + productSuitesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public Builder addProductSuites( + int index, com.google.cloud.productregistry.v1.ProductSuite value) { + if (productSuitesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductSuitesIsMutable(); + productSuites_.add(index, value); + onChanged(); + } else { + productSuitesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public Builder addProductSuites( + com.google.cloud.productregistry.v1.ProductSuite.Builder builderForValue) { + if (productSuitesBuilder_ == null) { + ensureProductSuitesIsMutable(); + productSuites_.add(builderForValue.build()); + onChanged(); + } else { + productSuitesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public Builder addProductSuites( + int index, com.google.cloud.productregistry.v1.ProductSuite.Builder builderForValue) { + if (productSuitesBuilder_ == null) { + ensureProductSuitesIsMutable(); + productSuites_.add(index, builderForValue.build()); + onChanged(); + } else { + productSuitesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public Builder addAllProductSuites( + java.lang.Iterable values) { + if (productSuitesBuilder_ == null) { + ensureProductSuitesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, productSuites_); + onChanged(); + } else { + productSuitesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public Builder clearProductSuites() { + if (productSuitesBuilder_ == null) { + productSuites_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + productSuitesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public Builder removeProductSuites(int index) { + if (productSuitesBuilder_ == null) { + ensureProductSuitesIsMutable(); + productSuites_.remove(index); + onChanged(); + } else { + productSuitesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public com.google.cloud.productregistry.v1.ProductSuite.Builder getProductSuitesBuilder( + int index) { + return internalGetProductSuitesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public com.google.cloud.productregistry.v1.ProductSuiteOrBuilder getProductSuitesOrBuilder( + int index) { + if (productSuitesBuilder_ == null) { + return productSuites_.get(index); + } else { + return productSuitesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public java.util.List + getProductSuitesOrBuilderList() { + if (productSuitesBuilder_ != null) { + return productSuitesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(productSuites_); + } + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public com.google.cloud.productregistry.v1.ProductSuite.Builder addProductSuitesBuilder() { + return internalGetProductSuitesFieldBuilder() + .addBuilder(com.google.cloud.productregistry.v1.ProductSuite.getDefaultInstance()); + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public com.google.cloud.productregistry.v1.ProductSuite.Builder addProductSuitesBuilder( + int index) { + return internalGetProductSuitesFieldBuilder() + .addBuilder(index, com.google.cloud.productregistry.v1.ProductSuite.getDefaultInstance()); + } + + /** + * + * + *
+     * Matched ProductSuites
+     * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + public java.util.List + getProductSuitesBuilderList() { + return internalGetProductSuitesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.productregistry.v1.ProductSuite, + com.google.cloud.productregistry.v1.ProductSuite.Builder, + com.google.cloud.productregistry.v1.ProductSuiteOrBuilder> + internalGetProductSuitesFieldBuilder() { + if (productSuitesBuilder_ == null) { + productSuitesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.productregistry.v1.ProductSuite, + com.google.cloud.productregistry.v1.ProductSuite.Builder, + com.google.cloud.productregistry.v1.ProductSuiteOrBuilder>( + productSuites_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + productSuites_ = null; + } + return productSuitesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.productregistry.v1.ListProductSuitesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.productregistry.v1.ListProductSuitesResponse) + private static final com.google.cloud.productregistry.v1.ListProductSuitesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.productregistry.v1.ListProductSuitesResponse(); + } + + public static com.google.cloud.productregistry.v1.ListProductSuitesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductSuitesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ListProductSuitesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListProductSuitesResponseOrBuilder.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListProductSuitesResponseOrBuilder.java new file mode 100644 index 000000000000..da4a3b427acf --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ListProductSuitesResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public interface ListProductSuitesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.productregistry.v1.ListProductSuitesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Matched ProductSuites
+   * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + java.util.List getProductSuitesList(); + + /** + * + * + *
+   * Matched ProductSuites
+   * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + com.google.cloud.productregistry.v1.ProductSuite getProductSuites(int index); + + /** + * + * + *
+   * Matched ProductSuites
+   * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + int getProductSuitesCount(); + + /** + * + * + *
+   * Matched ProductSuites
+   * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + java.util.List + getProductSuitesOrBuilderList(); + + /** + * + * + *
+   * Matched ProductSuites
+   * 
+ * + * repeated .google.cloud.productregistry.v1.ProductSuite product_suites = 1; + */ + com.google.cloud.productregistry.v1.ProductSuiteOrBuilder getProductSuitesOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProduct.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProduct.java new file mode 100644 index 000000000000..5ffcff9c4291 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProduct.java @@ -0,0 +1,1836 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/logical_product.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +/** + * + * + *
+ * Represents an independent service offering that can be
+ * provisioned by a customer.
+ * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.LogicalProduct} + */ +@com.google.protobuf.Generated +public final class LogicalProduct extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.productregistry.v1.LogicalProduct) + LogicalProductOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LogicalProduct"); + } + + // Use LogicalProduct.newBuilder() to construct. + private LogicalProduct(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LogicalProduct() { + name_ = ""; + title_ = ""; + productSuite_ = ""; + variants_ = com.google.protobuf.LazyStringArrayList.emptyList(); + lifecycleState_ = 0; + replacement_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.LogicalProductProto + .internal_static_google_cloud_productregistry_v1_LogicalProduct_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.LogicalProductProto + .internal_static_google_cloud_productregistry_v1_LogicalProduct_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.LogicalProduct.class, + com.google.cloud.productregistry.v1.LogicalProduct.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the LogicalProduct.
+   * Format: logicalProducts/{logical_product}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The resource name of the LogicalProduct.
+   * Format: logicalProducts/{logical_product}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TITLE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + + /** + * + * + *
+   * Display name of the LogicalProduct.
+   * 
+ * + * string title = 2; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + + /** + * + * + *
+   * Display name of the LogicalProduct.
+   * 
+ * + * string title = 2; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_SUITE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object productSuite_ = ""; + + /** + * + * + *
+   * Product suite associated with the logical product.
+   * Format: productSuites/{product_suite}.
+   * 
+ * + * string product_suite = 3 [(.google.api.resource_reference) = { ... } + * + * @return The productSuite. + */ + @java.lang.Override + public java.lang.String getProductSuite() { + java.lang.Object ref = productSuite_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSuite_ = s; + return s; + } + } + + /** + * + * + *
+   * Product suite associated with the logical product.
+   * Format: productSuites/{product_suite}.
+   * 
+ * + * string product_suite = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for productSuite. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProductSuiteBytes() { + java.lang.Object ref = productSuite_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + productSuite_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VARIANTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList variants_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. Child variant resource references.
+   * Format: logicalProducts/{logical_product}/variants/{variant}
+   * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the variants. + */ + public com.google.protobuf.ProtocolStringList getVariantsList() { + return variants_; + } + + /** + * + * + *
+   * Output only. Child variant resource references.
+   * Format: logicalProducts/{logical_product}/variants/{variant}
+   * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of variants. + */ + public int getVariantsCount() { + return variants_.size(); + } + + /** + * + * + *
+   * Output only. Child variant resource references.
+   * Format: logicalProducts/{logical_product}/variants/{variant}
+   * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The variants at the given index. + */ + public java.lang.String getVariants(int index) { + return variants_.get(index); + } + + /** + * + * + *
+   * Output only. Child variant resource references.
+   * Format: logicalProducts/{logical_product}/variants/{variant}
+   * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the variants at the given index. + */ + public com.google.protobuf.ByteString getVariantsBytes(int index) { + return variants_.getByteString(index); + } + + public static final int LIFECYCLE_STATE_FIELD_NUMBER = 5; + private int lifecycleState_ = 0; + + /** + * + * + *
+   * Output only. Current Lifecycle state of the logical product.
+   * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lifecycleState. + */ + @java.lang.Override + public int getLifecycleStateValue() { + return lifecycleState_; + } + + /** + * + * + *
+   * Output only. Current Lifecycle state of the logical product.
+   * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lifecycleState. + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.LifecycleState getLifecycleState() { + com.google.cloud.productregistry.v1.LifecycleState result = + com.google.cloud.productregistry.v1.LifecycleState.forNumber(lifecycleState_); + return result == null + ? com.google.cloud.productregistry.v1.LifecycleState.UNRECOGNIZED + : result; + } + + public static final int REPLACED_FIELD_NUMBER = 6; + private boolean replaced_ = false; + + /** + * + * + *
+   * Output only. Indicates whether the logical product has been replaced. If
+   * `false`, the product is active. If `true`, the product has been replaced by
+   * another type, and the `replacement` field contains the resource name of
+   * that replacement.
+   * 
+ * + * bool replaced = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The replaced. + */ + @java.lang.Override + public boolean getReplaced() { + return replaced_; + } + + public static final int REPLACEMENT_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object replacement_ = ""; + + /** + * + * + *
+   * Output only. The resource name of the Logical Entity that the logical
+   * product is replaced by. This field is only populated when this logical
+   * product is replaced by some other type. Eg:
+   * logicalProducts/{logical_product}/variants/{variant},
+   * productSuites/{product_suite}, etc.
+   * 
+ * + * + * string replacement = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The replacement. + */ + @java.lang.Override + public java.lang.String getReplacement() { + java.lang.Object ref = replacement_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + replacement_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The resource name of the Logical Entity that the logical
+   * product is replaced by. This field is only populated when this logical
+   * product is replaced by some other type. Eg:
+   * logicalProducts/{logical_product}/variants/{variant},
+   * productSuites/{product_suite}, etc.
+   * 
+ * + * + * string replacement = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for replacement. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReplacementBytes() { + java.lang.Object ref = replacement_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + replacement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(productSuite_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, productSuite_); + } + for (int i = 0; i < variants_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, variants_.getRaw(i)); + } + if (lifecycleState_ + != com.google.cloud.productregistry.v1.LifecycleState.LIFECYCLE_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, lifecycleState_); + } + if (replaced_ != false) { + output.writeBool(6, replaced_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(replacement_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, replacement_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(productSuite_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, productSuite_); + } + { + int dataSize = 0; + for (int i = 0; i < variants_.size(); i++) { + dataSize += computeStringSizeNoTag(variants_.getRaw(i)); + } + size += dataSize; + size += 1 * getVariantsList().size(); + } + if (lifecycleState_ + != com.google.cloud.productregistry.v1.LifecycleState.LIFECYCLE_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, lifecycleState_); + } + if (replaced_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, replaced_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(replacement_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, replacement_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.productregistry.v1.LogicalProduct)) { + return super.equals(obj); + } + com.google.cloud.productregistry.v1.LogicalProduct other = + (com.google.cloud.productregistry.v1.LogicalProduct) obj; + + if (!getName().equals(other.getName())) return false; + if (!getTitle().equals(other.getTitle())) return false; + if (!getProductSuite().equals(other.getProductSuite())) return false; + if (!getVariantsList().equals(other.getVariantsList())) return false; + if (lifecycleState_ != other.lifecycleState_) return false; + if (getReplaced() != other.getReplaced()) return false; + if (!getReplacement().equals(other.getReplacement())) return false; + if (!getUnknownFields().equals(other.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) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + PRODUCT_SUITE_FIELD_NUMBER; + hash = (53 * hash) + getProductSuite().hashCode(); + if (getVariantsCount() > 0) { + hash = (37 * hash) + VARIANTS_FIELD_NUMBER; + hash = (53 * hash) + getVariantsList().hashCode(); + } + hash = (37 * hash) + LIFECYCLE_STATE_FIELD_NUMBER; + hash = (53 * hash) + lifecycleState_; + hash = (37 * hash) + REPLACED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReplaced()); + hash = (37 * hash) + REPLACEMENT_FIELD_NUMBER; + hash = (53 * hash) + getReplacement().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.productregistry.v1.LogicalProduct parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.LogicalProduct parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LogicalProduct parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.LogicalProduct parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LogicalProduct parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.LogicalProduct parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LogicalProduct parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.LogicalProduct parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LogicalProduct parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.LogicalProduct parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LogicalProduct parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.LogicalProduct parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.productregistry.v1.LogicalProduct prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents an independent service offering that can be
+   * provisioned by a customer.
+   * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.LogicalProduct} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.productregistry.v1.LogicalProduct) + com.google.cloud.productregistry.v1.LogicalProductOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.LogicalProductProto + .internal_static_google_cloud_productregistry_v1_LogicalProduct_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.LogicalProductProto + .internal_static_google_cloud_productregistry_v1_LogicalProduct_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.LogicalProduct.class, + com.google.cloud.productregistry.v1.LogicalProduct.Builder.class); + } + + // Construct using com.google.cloud.productregistry.v1.LogicalProduct.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + title_ = ""; + productSuite_ = ""; + variants_ = com.google.protobuf.LazyStringArrayList.emptyList(); + lifecycleState_ = 0; + replaced_ = false; + replacement_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.productregistry.v1.LogicalProductProto + .internal_static_google_cloud_productregistry_v1_LogicalProduct_descriptor; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProduct getDefaultInstanceForType() { + return com.google.cloud.productregistry.v1.LogicalProduct.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProduct build() { + com.google.cloud.productregistry.v1.LogicalProduct result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProduct buildPartial() { + com.google.cloud.productregistry.v1.LogicalProduct result = + new com.google.cloud.productregistry.v1.LogicalProduct(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.productregistry.v1.LogicalProduct result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.productSuite_ = productSuite_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + variants_.makeImmutable(); + result.variants_ = variants_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.lifecycleState_ = lifecycleState_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.replaced_ = replaced_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.replacement_ = replacement_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.productregistry.v1.LogicalProduct) { + return mergeFrom((com.google.cloud.productregistry.v1.LogicalProduct) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.productregistry.v1.LogicalProduct other) { + if (other == com.google.cloud.productregistry.v1.LogicalProduct.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getProductSuite().isEmpty()) { + productSuite_ = other.productSuite_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.variants_.isEmpty()) { + if (variants_.isEmpty()) { + variants_ = other.variants_; + bitField0_ |= 0x00000008; + } else { + ensureVariantsIsMutable(); + variants_.addAll(other.variants_); + } + onChanged(); + } + if (other.lifecycleState_ != 0) { + setLifecycleStateValue(other.getLifecycleStateValue()); + } + if (other.getReplaced() != false) { + setReplaced(other.getReplaced()); + } + if (!other.getReplacement().isEmpty()) { + replacement_ = other.replacement_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + productSuite_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureVariantsIsMutable(); + variants_.add(s); + break; + } // case 34 + case 40: + { + lifecycleState_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + replaced_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + replacement_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + 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_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the LogicalProduct.
+     * Format: logicalProducts/{logical_product}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the LogicalProduct.
+     * Format: logicalProducts/{logical_product}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the LogicalProduct.
+     * Format: logicalProducts/{logical_product}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the LogicalProduct.
+     * Format: logicalProducts/{logical_product}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the LogicalProduct.
+     * Format: logicalProducts/{logical_product}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + + /** + * + * + *
+     * Display name of the LogicalProduct.
+     * 
+ * + * string title = 2; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Display name of the LogicalProduct.
+     * 
+ * + * string title = 2; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Display name of the LogicalProduct.
+     * 
+ * + * string title = 2; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Display name of the LogicalProduct.
+     * 
+ * + * string title = 2; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Display name of the LogicalProduct.
+     * 
+ * + * string title = 2; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object productSuite_ = ""; + + /** + * + * + *
+     * Product suite associated with the logical product.
+     * Format: productSuites/{product_suite}.
+     * 
+ * + * string product_suite = 3 [(.google.api.resource_reference) = { ... } + * + * @return The productSuite. + */ + public java.lang.String getProductSuite() { + java.lang.Object ref = productSuite_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productSuite_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Product suite associated with the logical product.
+     * Format: productSuites/{product_suite}.
+     * 
+ * + * string product_suite = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for productSuite. + */ + public com.google.protobuf.ByteString getProductSuiteBytes() { + java.lang.Object ref = productSuite_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + productSuite_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Product suite associated with the logical product.
+     * Format: productSuites/{product_suite}.
+     * 
+ * + * string product_suite = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The productSuite to set. + * @return This builder for chaining. + */ + public Builder setProductSuite(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + productSuite_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Product suite associated with the logical product.
+     * Format: productSuites/{product_suite}.
+     * 
+ * + * string product_suite = 3 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearProductSuite() { + productSuite_ = getDefaultInstance().getProductSuite(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Product suite associated with the logical product.
+     * Format: productSuites/{product_suite}.
+     * 
+ * + * string product_suite = 3 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for productSuite to set. + * @return This builder for chaining. + */ + public Builder setProductSuiteBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + productSuite_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList variants_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureVariantsIsMutable() { + if (!variants_.isModifiable()) { + variants_ = new com.google.protobuf.LazyStringArrayList(variants_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+     * Output only. Child variant resource references.
+     * Format: logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the variants. + */ + public com.google.protobuf.ProtocolStringList getVariantsList() { + variants_.makeImmutable(); + return variants_; + } + + /** + * + * + *
+     * Output only. Child variant resource references.
+     * Format: logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of variants. + */ + public int getVariantsCount() { + return variants_.size(); + } + + /** + * + * + *
+     * Output only. Child variant resource references.
+     * Format: logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The variants at the given index. + */ + public java.lang.String getVariants(int index) { + return variants_.get(index); + } + + /** + * + * + *
+     * Output only. Child variant resource references.
+     * Format: logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the variants at the given index. + */ + public com.google.protobuf.ByteString getVariantsBytes(int index) { + return variants_.getByteString(index); + } + + /** + * + * + *
+     * Output only. Child variant resource references.
+     * Format: logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The variants to set. + * @return This builder for chaining. + */ + public Builder setVariants(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantsIsMutable(); + variants_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Child variant resource references.
+     * Format: logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The variants to add. + * @return This builder for chaining. + */ + public Builder addVariants(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureVariantsIsMutable(); + variants_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Child variant resource references.
+     * Format: logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param values The variants to add. + * @return This builder for chaining. + */ + public Builder addAllVariants(java.lang.Iterable values) { + ensureVariantsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, variants_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Child variant resource references.
+     * Format: logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearVariants() { + variants_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Child variant resource references.
+     * Format: logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the variants to add. + * @return This builder for chaining. + */ + public Builder addVariantsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureVariantsIsMutable(); + variants_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int lifecycleState_ = 0; + + /** + * + * + *
+     * Output only. Current Lifecycle state of the logical product.
+     * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lifecycleState. + */ + @java.lang.Override + public int getLifecycleStateValue() { + return lifecycleState_; + } + + /** + * + * + *
+     * Output only. Current Lifecycle state of the logical product.
+     * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for lifecycleState to set. + * @return This builder for chaining. + */ + public Builder setLifecycleStateValue(int value) { + lifecycleState_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Current Lifecycle state of the logical product.
+     * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lifecycleState. + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.LifecycleState getLifecycleState() { + com.google.cloud.productregistry.v1.LifecycleState result = + com.google.cloud.productregistry.v1.LifecycleState.forNumber(lifecycleState_); + return result == null + ? com.google.cloud.productregistry.v1.LifecycleState.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. Current Lifecycle state of the logical product.
+     * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The lifecycleState to set. + * @return This builder for chaining. + */ + public Builder setLifecycleState(com.google.cloud.productregistry.v1.LifecycleState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + lifecycleState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Current Lifecycle state of the logical product.
+     * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearLifecycleState() { + bitField0_ = (bitField0_ & ~0x00000010); + lifecycleState_ = 0; + onChanged(); + return this; + } + + private boolean replaced_; + + /** + * + * + *
+     * Output only. Indicates whether the logical product has been replaced. If
+     * `false`, the product is active. If `true`, the product has been replaced by
+     * another type, and the `replacement` field contains the resource name of
+     * that replacement.
+     * 
+ * + * bool replaced = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The replaced. + */ + @java.lang.Override + public boolean getReplaced() { + return replaced_; + } + + /** + * + * + *
+     * Output only. Indicates whether the logical product has been replaced. If
+     * `false`, the product is active. If `true`, the product has been replaced by
+     * another type, and the `replacement` field contains the resource name of
+     * that replacement.
+     * 
+ * + * bool replaced = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The replaced to set. + * @return This builder for chaining. + */ + public Builder setReplaced(boolean value) { + + replaced_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Indicates whether the logical product has been replaced. If
+     * `false`, the product is active. If `true`, the product has been replaced by
+     * another type, and the `replacement` field contains the resource name of
+     * that replacement.
+     * 
+ * + * bool replaced = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearReplaced() { + bitField0_ = (bitField0_ & ~0x00000020); + replaced_ = false; + onChanged(); + return this; + } + + private java.lang.Object replacement_ = ""; + + /** + * + * + *
+     * Output only. The resource name of the Logical Entity that the logical
+     * product is replaced by. This field is only populated when this logical
+     * product is replaced by some other type. Eg:
+     * logicalProducts/{logical_product}/variants/{variant},
+     * productSuites/{product_suite}, etc.
+     * 
+ * + * + * string replacement = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The replacement. + */ + public java.lang.String getReplacement() { + java.lang.Object ref = replacement_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + replacement_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the Logical Entity that the logical
+     * product is replaced by. This field is only populated when this logical
+     * product is replaced by some other type. Eg:
+     * logicalProducts/{logical_product}/variants/{variant},
+     * productSuites/{product_suite}, etc.
+     * 
+ * + * + * string replacement = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for replacement. + */ + public com.google.protobuf.ByteString getReplacementBytes() { + java.lang.Object ref = replacement_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + replacement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the Logical Entity that the logical
+     * product is replaced by. This field is only populated when this logical
+     * product is replaced by some other type. Eg:
+     * logicalProducts/{logical_product}/variants/{variant},
+     * productSuites/{product_suite}, etc.
+     * 
+ * + * + * string replacement = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The replacement to set. + * @return This builder for chaining. + */ + public Builder setReplacement(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + replacement_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the Logical Entity that the logical
+     * product is replaced by. This field is only populated when this logical
+     * product is replaced by some other type. Eg:
+     * logicalProducts/{logical_product}/variants/{variant},
+     * productSuites/{product_suite}, etc.
+     * 
+ * + * + * string replacement = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearReplacement() { + replacement_ = getDefaultInstance().getReplacement(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the Logical Entity that the logical
+     * product is replaced by. This field is only populated when this logical
+     * product is replaced by some other type. Eg:
+     * logicalProducts/{logical_product}/variants/{variant},
+     * productSuites/{product_suite}, etc.
+     * 
+ * + * + * string replacement = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for replacement to set. + * @return This builder for chaining. + */ + public Builder setReplacementBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + replacement_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.productregistry.v1.LogicalProduct) + } + + // @@protoc_insertion_point(class_scope:google.cloud.productregistry.v1.LogicalProduct) + private static final com.google.cloud.productregistry.v1.LogicalProduct DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.productregistry.v1.LogicalProduct(); + } + + public static com.google.cloud.productregistry.v1.LogicalProduct getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LogicalProduct parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProduct getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductName.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductName.java new file mode 100644 index 000000000000..4c859323305b --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductName.java @@ -0,0 +1,171 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.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; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class LogicalProductName implements ResourceName { + private static final PathTemplate LOGICAL_PRODUCT = + PathTemplate.createWithoutUrlEncoding("logicalProducts/{logical_product}"); + private volatile Map fieldValuesMap; + private final String logicalProduct; + + @Deprecated + protected LogicalProductName() { + logicalProduct = null; + } + + private LogicalProductName(Builder builder) { + logicalProduct = Preconditions.checkNotNull(builder.getLogicalProduct()); + } + + public String getLogicalProduct() { + return logicalProduct; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LogicalProductName of(String logicalProduct) { + return newBuilder().setLogicalProduct(logicalProduct).build(); + } + + public static String format(String logicalProduct) { + return newBuilder().setLogicalProduct(logicalProduct).build().toString(); + } + + public static @Nullable LogicalProductName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + LOGICAL_PRODUCT.validatedMatch( + formattedString, "LogicalProductName.parse: formattedString not in valid format"); + return of(matchMap.get("logical_product")); + } + + 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<@Nullable LogicalProductName> values) { + List list = new ArrayList<>(values.size()); + for (LogicalProductName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return LOGICAL_PRODUCT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (logicalProduct != null) { + fieldMapBuilder.put("logical_product", logicalProduct); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return LOGICAL_PRODUCT.instantiate("logical_product", logicalProduct); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LogicalProductName that = ((LogicalProductName) o); + return Objects.equals(this.logicalProduct, that.logicalProduct); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(logicalProduct); + return h; + } + + /** Builder for logicalProducts/{logical_product}. */ + public static class Builder { + private String logicalProduct; + + protected Builder() {} + + public String getLogicalProduct() { + return logicalProduct; + } + + public Builder setLogicalProduct(String logicalProduct) { + this.logicalProduct = logicalProduct; + return this; + } + + private Builder(LogicalProductName logicalProductName) { + this.logicalProduct = logicalProductName.logicalProduct; + } + + public LogicalProductName build() { + return new LogicalProductName(this); + } + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductOrBuilder.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductOrBuilder.java new file mode 100644 index 000000000000..1bd631b5eab5 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductOrBuilder.java @@ -0,0 +1,260 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/logical_product.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public interface LogicalProductOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.productregistry.v1.LogicalProduct) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the LogicalProduct.
+   * Format: logicalProducts/{logical_product}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the LogicalProduct.
+   * Format: logicalProducts/{logical_product}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Display name of the LogicalProduct.
+   * 
+ * + * string title = 2; + * + * @return The title. + */ + java.lang.String getTitle(); + + /** + * + * + *
+   * Display name of the LogicalProduct.
+   * 
+ * + * string title = 2; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
+   * Product suite associated with the logical product.
+   * Format: productSuites/{product_suite}.
+   * 
+ * + * string product_suite = 3 [(.google.api.resource_reference) = { ... } + * + * @return The productSuite. + */ + java.lang.String getProductSuite(); + + /** + * + * + *
+   * Product suite associated with the logical product.
+   * Format: productSuites/{product_suite}.
+   * 
+ * + * string product_suite = 3 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for productSuite. + */ + com.google.protobuf.ByteString getProductSuiteBytes(); + + /** + * + * + *
+   * Output only. Child variant resource references.
+   * Format: logicalProducts/{logical_product}/variants/{variant}
+   * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the variants. + */ + java.util.List getVariantsList(); + + /** + * + * + *
+   * Output only. Child variant resource references.
+   * Format: logicalProducts/{logical_product}/variants/{variant}
+   * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of variants. + */ + int getVariantsCount(); + + /** + * + * + *
+   * Output only. Child variant resource references.
+   * Format: logicalProducts/{logical_product}/variants/{variant}
+   * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The variants at the given index. + */ + java.lang.String getVariants(int index); + + /** + * + * + *
+   * Output only. Child variant resource references.
+   * Format: logicalProducts/{logical_product}/variants/{variant}
+   * 
+ * + * + * repeated string variants = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the variants at the given index. + */ + com.google.protobuf.ByteString getVariantsBytes(int index); + + /** + * + * + *
+   * Output only. Current Lifecycle state of the logical product.
+   * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lifecycleState. + */ + int getLifecycleStateValue(); + + /** + * + * + *
+   * Output only. Current Lifecycle state of the logical product.
+   * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lifecycleState. + */ + com.google.cloud.productregistry.v1.LifecycleState getLifecycleState(); + + /** + * + * + *
+   * Output only. Indicates whether the logical product has been replaced. If
+   * `false`, the product is active. If `true`, the product has been replaced by
+   * another type, and the `replacement` field contains the resource name of
+   * that replacement.
+   * 
+ * + * bool replaced = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The replaced. + */ + boolean getReplaced(); + + /** + * + * + *
+   * Output only. The resource name of the Logical Entity that the logical
+   * product is replaced by. This field is only populated when this logical
+   * product is replaced by some other type. Eg:
+   * logicalProducts/{logical_product}/variants/{variant},
+   * productSuites/{product_suite}, etc.
+   * 
+ * + * + * string replacement = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The replacement. + */ + java.lang.String getReplacement(); + + /** + * + * + *
+   * Output only. The resource name of the Logical Entity that the logical
+   * product is replaced by. This field is only populated when this logical
+   * product is replaced by some other type. Eg:
+   * logicalProducts/{logical_product}/variants/{variant},
+   * productSuites/{product_suite}, etc.
+   * 
+ * + * + * string replacement = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for replacement. + */ + com.google.protobuf.ByteString getReplacementBytes(); +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductProto.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductProto.java new file mode 100644 index 000000000000..9d1113df0abf --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductProto.java @@ -0,0 +1,117 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/logical_product.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public final class LogicalProductProto extends com.google.protobuf.GeneratedFile { + private LogicalProductProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LogicalProductProto"); + } + + 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_productregistry_v1_LogicalProduct_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_productregistry_v1_LogicalProduct_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n5google/cloud/productregistry/v1/logica" + + "l_product.proto\022\037google.cloud.productreg" + + "istry.v1\032\037google/api/field_behavior.prot" + + "o\032\031google/api/resource.proto\0325google/clo" + + "ud/productregistry/v1/lifecycle_state.pr" + + "oto\"\330\003\n\016LogicalProduct\022\021\n\004name\030\001 \001(\tB\003\340A" + + "\010\022\r\n\005title\030\002 \001(\t\022L\n\rproduct_suite\030\003 \001(\tB" + + "5\372A2\n0cloudproductregistry.googleapis.co" + + "m/ProductSuite\022S\n\010variants\030\004 \003(\tBA\340A\003\372A;" + + "\n9cloudproductregistry.googleapis.com/Lo" + + "gicalProductVariant\022M\n\017lifecycle_state\030\005" + + " \001(\0162/.google.cloud.productregistry.v1.L" + + "ifecycleStateB\003\340A\003\022\025\n\010replaced\030\006 \001(\010B\003\340A" + + "\003\022\036\n\013replacement\030\007 \001(\tB\t\340A\003\372A\003\n\001*:{\352Ax\n2" + + "cloudproductregistry.googleapis.com/Logi" + + "calProduct\022!logicalProducts/{logical_pro" + + "duct}*\017logicalProducts2\016logicalProductB\364" + + "\001\n#com.google.cloud.productregistry.v1B\023" + + "LogicalProductProtoP\001ZMcloud.google.com/" + + "go/productregistry/apiv1/productregistry" + + "pb;productregistrypb\252\002\037Google.Cloud.Prod" + + "uctRegistry.V1\312\002\037Google\\Cloud\\ProductReg" + + "istry\\V1\352\002\"Google::Cloud::ProductRegistr" + + "y::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.productregistry.v1.LifecycleStateProto.getDescriptor(), + }); + internal_static_google_cloud_productregistry_v1_LogicalProduct_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_productregistry_v1_LogicalProduct_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_productregistry_v1_LogicalProduct_descriptor, + new java.lang.String[] { + "Name", + "Title", + "ProductSuite", + "Variants", + "LifecycleState", + "Replaced", + "Replacement", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.productregistry.v1.LifecycleStateProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductVariant.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductVariant.java new file mode 100644 index 000000000000..034766894ce4 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductVariant.java @@ -0,0 +1,1314 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/logical_product_variant.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +/** + * + * + *
+ * Represents a distinct offering derived from a primary product that retains
+ * core functionalities but offers specialized features for a specific market
+ * segment.
+ * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.LogicalProductVariant} + */ +@com.google.protobuf.Generated +public final class LogicalProductVariant extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.productregistry.v1.LogicalProductVariant) + LogicalProductVariantOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LogicalProductVariant"); + } + + // Use LogicalProductVariant.newBuilder() to construct. + private LogicalProductVariant(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LogicalProductVariant() { + name_ = ""; + title_ = ""; + lifecycleState_ = 0; + replacement_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.LogicalProductVariantProto + .internal_static_google_cloud_productregistry_v1_LogicalProductVariant_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.LogicalProductVariantProto + .internal_static_google_cloud_productregistry_v1_LogicalProductVariant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.LogicalProductVariant.class, + com.google.cloud.productregistry.v1.LogicalProductVariant.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the LogicalProductVariant.
+   * Format:
+   * logicalProducts/{logical_product}/variants/{variant}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The resource name of the LogicalProductVariant.
+   * Format:
+   * logicalProducts/{logical_product}/variants/{variant}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TITLE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + + /** + * + * + *
+   * Display name of the LogicalProductVariant.
+   * 
+ * + * string title = 2; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + + /** + * + * + *
+   * Display name of the LogicalProductVariant.
+   * 
+ * + * string title = 2; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LIFECYCLE_STATE_FIELD_NUMBER = 3; + private int lifecycleState_ = 0; + + /** + * + * + *
+   * Output only. Current Lifecycle state of the logical product variant.
+   * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lifecycleState. + */ + @java.lang.Override + public int getLifecycleStateValue() { + return lifecycleState_; + } + + /** + * + * + *
+   * Output only. Current Lifecycle state of the logical product variant.
+   * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lifecycleState. + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.LifecycleState getLifecycleState() { + com.google.cloud.productregistry.v1.LifecycleState result = + com.google.cloud.productregistry.v1.LifecycleState.forNumber(lifecycleState_); + return result == null + ? com.google.cloud.productregistry.v1.LifecycleState.UNRECOGNIZED + : result; + } + + public static final int REPLACED_FIELD_NUMBER = 4; + private boolean replaced_ = false; + + /** + * + * + *
+   * Output only. Indicates whether the logical product variant has been
+   * replaced. If `false`, the variant is active. If `true`, the variant has
+   * been replaced by another type, and the `replacement` field contains the
+   * resource name of that replacement.
+   * 
+ * + * bool replaced = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The replaced. + */ + @java.lang.Override + public boolean getReplaced() { + return replaced_; + } + + public static final int REPLACEMENT_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object replacement_ = ""; + + /** + * + * + *
+   * Output only. The resource name of the Logical Entity that the logical
+   * product variant is replaced by. This field is only populated when this
+   * logical product variant is replaced by some other type. Eg:
+   * logicalProducts/{logical_product}, productSuites/{product_suite}, etc.
+   * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The replacement. + */ + @java.lang.Override + public java.lang.String getReplacement() { + java.lang.Object ref = replacement_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + replacement_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The resource name of the Logical Entity that the logical
+   * product variant is replaced by. This field is only populated when this
+   * logical product variant is replaced by some other type. Eg:
+   * logicalProducts/{logical_product}, productSuites/{product_suite}, etc.
+   * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for replacement. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReplacementBytes() { + java.lang.Object ref = replacement_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + replacement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, title_); + } + if (lifecycleState_ + != com.google.cloud.productregistry.v1.LifecycleState.LIFECYCLE_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, lifecycleState_); + } + if (replaced_ != false) { + output.writeBool(4, replaced_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(replacement_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, replacement_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, title_); + } + if (lifecycleState_ + != com.google.cloud.productregistry.v1.LifecycleState.LIFECYCLE_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, lifecycleState_); + } + if (replaced_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, replaced_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(replacement_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, replacement_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.productregistry.v1.LogicalProductVariant)) { + return super.equals(obj); + } + com.google.cloud.productregistry.v1.LogicalProductVariant other = + (com.google.cloud.productregistry.v1.LogicalProductVariant) obj; + + if (!getName().equals(other.getName())) return false; + if (!getTitle().equals(other.getTitle())) return false; + if (lifecycleState_ != other.lifecycleState_) return false; + if (getReplaced() != other.getReplaced()) return false; + if (!getReplacement().equals(other.getReplacement())) return false; + if (!getUnknownFields().equals(other.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) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + LIFECYCLE_STATE_FIELD_NUMBER; + hash = (53 * hash) + lifecycleState_; + hash = (37 * hash) + REPLACED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReplaced()); + hash = (37 * hash) + REPLACEMENT_FIELD_NUMBER; + hash = (53 * hash) + getReplacement().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.productregistry.v1.LogicalProductVariant parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.LogicalProductVariant parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LogicalProductVariant parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.LogicalProductVariant parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LogicalProductVariant parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.LogicalProductVariant parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LogicalProductVariant parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.LogicalProductVariant parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LogicalProductVariant parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.LogicalProductVariant parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LogicalProductVariant parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.LogicalProductVariant parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.productregistry.v1.LogicalProductVariant prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents a distinct offering derived from a primary product that retains
+   * core functionalities but offers specialized features for a specific market
+   * segment.
+   * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.LogicalProductVariant} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.productregistry.v1.LogicalProductVariant) + com.google.cloud.productregistry.v1.LogicalProductVariantOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.LogicalProductVariantProto + .internal_static_google_cloud_productregistry_v1_LogicalProductVariant_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.LogicalProductVariantProto + .internal_static_google_cloud_productregistry_v1_LogicalProductVariant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.LogicalProductVariant.class, + com.google.cloud.productregistry.v1.LogicalProductVariant.Builder.class); + } + + // Construct using com.google.cloud.productregistry.v1.LogicalProductVariant.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + title_ = ""; + lifecycleState_ = 0; + replaced_ = false; + replacement_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.productregistry.v1.LogicalProductVariantProto + .internal_static_google_cloud_productregistry_v1_LogicalProductVariant_descriptor; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProductVariant getDefaultInstanceForType() { + return com.google.cloud.productregistry.v1.LogicalProductVariant.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProductVariant build() { + com.google.cloud.productregistry.v1.LogicalProductVariant result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProductVariant buildPartial() { + com.google.cloud.productregistry.v1.LogicalProductVariant result = + new com.google.cloud.productregistry.v1.LogicalProductVariant(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.productregistry.v1.LogicalProductVariant result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.lifecycleState_ = lifecycleState_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.replaced_ = replaced_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.replacement_ = replacement_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.productregistry.v1.LogicalProductVariant) { + return mergeFrom((com.google.cloud.productregistry.v1.LogicalProductVariant) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.productregistry.v1.LogicalProductVariant other) { + if (other == com.google.cloud.productregistry.v1.LogicalProductVariant.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.lifecycleState_ != 0) { + setLifecycleStateValue(other.getLifecycleStateValue()); + } + if (other.getReplaced() != false) { + setReplaced(other.getReplaced()); + } + if (!other.getReplacement().isEmpty()) { + replacement_ = other.replacement_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + lifecycleState_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + replaced_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + replacement_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the LogicalProductVariant.
+     * Format:
+     * logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the LogicalProductVariant.
+     * Format:
+     * logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the LogicalProductVariant.
+     * Format:
+     * logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the LogicalProductVariant.
+     * Format:
+     * logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the LogicalProductVariant.
+     * Format:
+     * logicalProducts/{logical_product}/variants/{variant}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + + /** + * + * + *
+     * Display name of the LogicalProductVariant.
+     * 
+ * + * string title = 2; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Display name of the LogicalProductVariant.
+     * 
+ * + * string title = 2; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Display name of the LogicalProductVariant.
+     * 
+ * + * string title = 2; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Display name of the LogicalProductVariant.
+     * 
+ * + * string title = 2; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Display name of the LogicalProductVariant.
+     * 
+ * + * string title = 2; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int lifecycleState_ = 0; + + /** + * + * + *
+     * Output only. Current Lifecycle state of the logical product variant.
+     * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lifecycleState. + */ + @java.lang.Override + public int getLifecycleStateValue() { + return lifecycleState_; + } + + /** + * + * + *
+     * Output only. Current Lifecycle state of the logical product variant.
+     * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for lifecycleState to set. + * @return This builder for chaining. + */ + public Builder setLifecycleStateValue(int value) { + lifecycleState_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Current Lifecycle state of the logical product variant.
+     * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lifecycleState. + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.LifecycleState getLifecycleState() { + com.google.cloud.productregistry.v1.LifecycleState result = + com.google.cloud.productregistry.v1.LifecycleState.forNumber(lifecycleState_); + return result == null + ? com.google.cloud.productregistry.v1.LifecycleState.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. Current Lifecycle state of the logical product variant.
+     * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The lifecycleState to set. + * @return This builder for chaining. + */ + public Builder setLifecycleState(com.google.cloud.productregistry.v1.LifecycleState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + lifecycleState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Current Lifecycle state of the logical product variant.
+     * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearLifecycleState() { + bitField0_ = (bitField0_ & ~0x00000004); + lifecycleState_ = 0; + onChanged(); + return this; + } + + private boolean replaced_; + + /** + * + * + *
+     * Output only. Indicates whether the logical product variant has been
+     * replaced. If `false`, the variant is active. If `true`, the variant has
+     * been replaced by another type, and the `replacement` field contains the
+     * resource name of that replacement.
+     * 
+ * + * bool replaced = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The replaced. + */ + @java.lang.Override + public boolean getReplaced() { + return replaced_; + } + + /** + * + * + *
+     * Output only. Indicates whether the logical product variant has been
+     * replaced. If `false`, the variant is active. If `true`, the variant has
+     * been replaced by another type, and the `replacement` field contains the
+     * resource name of that replacement.
+     * 
+ * + * bool replaced = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The replaced to set. + * @return This builder for chaining. + */ + public Builder setReplaced(boolean value) { + + replaced_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Indicates whether the logical product variant has been
+     * replaced. If `false`, the variant is active. If `true`, the variant has
+     * been replaced by another type, and the `replacement` field contains the
+     * resource name of that replacement.
+     * 
+ * + * bool replaced = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearReplaced() { + bitField0_ = (bitField0_ & ~0x00000008); + replaced_ = false; + onChanged(); + return this; + } + + private java.lang.Object replacement_ = ""; + + /** + * + * + *
+     * Output only. The resource name of the Logical Entity that the logical
+     * product variant is replaced by. This field is only populated when this
+     * logical product variant is replaced by some other type. Eg:
+     * logicalProducts/{logical_product}, productSuites/{product_suite}, etc.
+     * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The replacement. + */ + public java.lang.String getReplacement() { + java.lang.Object ref = replacement_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + replacement_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the Logical Entity that the logical
+     * product variant is replaced by. This field is only populated when this
+     * logical product variant is replaced by some other type. Eg:
+     * logicalProducts/{logical_product}, productSuites/{product_suite}, etc.
+     * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for replacement. + */ + public com.google.protobuf.ByteString getReplacementBytes() { + java.lang.Object ref = replacement_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + replacement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the Logical Entity that the logical
+     * product variant is replaced by. This field is only populated when this
+     * logical product variant is replaced by some other type. Eg:
+     * logicalProducts/{logical_product}, productSuites/{product_suite}, etc.
+     * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The replacement to set. + * @return This builder for chaining. + */ + public Builder setReplacement(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + replacement_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the Logical Entity that the logical
+     * product variant is replaced by. This field is only populated when this
+     * logical product variant is replaced by some other type. Eg:
+     * logicalProducts/{logical_product}, productSuites/{product_suite}, etc.
+     * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearReplacement() { + replacement_ = getDefaultInstance().getReplacement(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the Logical Entity that the logical
+     * product variant is replaced by. This field is only populated when this
+     * logical product variant is replaced by some other type. Eg:
+     * logicalProducts/{logical_product}, productSuites/{product_suite}, etc.
+     * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for replacement to set. + * @return This builder for chaining. + */ + public Builder setReplacementBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + replacement_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.productregistry.v1.LogicalProductVariant) + } + + // @@protoc_insertion_point(class_scope:google.cloud.productregistry.v1.LogicalProductVariant) + private static final com.google.cloud.productregistry.v1.LogicalProductVariant DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.productregistry.v1.LogicalProductVariant(); + } + + public static com.google.cloud.productregistry.v1.LogicalProductVariant getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LogicalProductVariant parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProductVariant getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductVariantName.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductVariantName.java new file mode 100644 index 000000000000..05db5f34455a --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductVariantName.java @@ -0,0 +1,197 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.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; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class LogicalProductVariantName implements ResourceName { + private static final PathTemplate LOGICAL_PRODUCT_VARIANT = + PathTemplate.createWithoutUrlEncoding("logicalProducts/{logical_product}/variants/{variant}"); + private volatile Map fieldValuesMap; + private final String logicalProduct; + private final String variant; + + @Deprecated + protected LogicalProductVariantName() { + logicalProduct = null; + variant = null; + } + + private LogicalProductVariantName(Builder builder) { + logicalProduct = Preconditions.checkNotNull(builder.getLogicalProduct()); + variant = Preconditions.checkNotNull(builder.getVariant()); + } + + public String getLogicalProduct() { + return logicalProduct; + } + + public String getVariant() { + return variant; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LogicalProductVariantName of(String logicalProduct, String variant) { + return newBuilder().setLogicalProduct(logicalProduct).setVariant(variant).build(); + } + + public static String format(String logicalProduct, String variant) { + return newBuilder().setLogicalProduct(logicalProduct).setVariant(variant).build().toString(); + } + + public static @Nullable LogicalProductVariantName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + LOGICAL_PRODUCT_VARIANT.validatedMatch( + formattedString, + "LogicalProductVariantName.parse: formattedString not in valid format"); + return of(matchMap.get("logical_product"), matchMap.get("variant")); + } + + 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<@Nullable LogicalProductVariantName> values) { + List list = new ArrayList<>(values.size()); + for (LogicalProductVariantName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return LOGICAL_PRODUCT_VARIANT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (logicalProduct != null) { + fieldMapBuilder.put("logical_product", logicalProduct); + } + if (variant != null) { + fieldMapBuilder.put("variant", variant); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return LOGICAL_PRODUCT_VARIANT.instantiate( + "logical_product", logicalProduct, "variant", variant); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LogicalProductVariantName that = ((LogicalProductVariantName) o); + return Objects.equals(this.logicalProduct, that.logicalProduct) + && Objects.equals(this.variant, that.variant); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(logicalProduct); + h *= 1000003; + h ^= Objects.hashCode(variant); + return h; + } + + /** Builder for logicalProducts/{logical_product}/variants/{variant}. */ + public static class Builder { + private String logicalProduct; + private String variant; + + protected Builder() {} + + public String getLogicalProduct() { + return logicalProduct; + } + + public String getVariant() { + return variant; + } + + public Builder setLogicalProduct(String logicalProduct) { + this.logicalProduct = logicalProduct; + return this; + } + + public Builder setVariant(String variant) { + this.variant = variant; + return this; + } + + private Builder(LogicalProductVariantName logicalProductVariantName) { + this.logicalProduct = logicalProductVariantName.logicalProduct; + this.variant = logicalProductVariantName.variant; + } + + public LogicalProductVariantName build() { + return new LogicalProductVariantName(this); + } + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductVariantOrBuilder.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductVariantOrBuilder.java new file mode 100644 index 000000000000..045a97a0c19e --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductVariantOrBuilder.java @@ -0,0 +1,166 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/logical_product_variant.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public interface LogicalProductVariantOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.productregistry.v1.LogicalProductVariant) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the LogicalProductVariant.
+   * Format:
+   * logicalProducts/{logical_product}/variants/{variant}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the LogicalProductVariant.
+   * Format:
+   * logicalProducts/{logical_product}/variants/{variant}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Display name of the LogicalProductVariant.
+   * 
+ * + * string title = 2; + * + * @return The title. + */ + java.lang.String getTitle(); + + /** + * + * + *
+   * Display name of the LogicalProductVariant.
+   * 
+ * + * string title = 2; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
+   * Output only. Current Lifecycle state of the logical product variant.
+   * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for lifecycleState. + */ + int getLifecycleStateValue(); + + /** + * + * + *
+   * Output only. Current Lifecycle state of the logical product variant.
+   * 
+ * + * + * .google.cloud.productregistry.v1.LifecycleState lifecycle_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lifecycleState. + */ + com.google.cloud.productregistry.v1.LifecycleState getLifecycleState(); + + /** + * + * + *
+   * Output only. Indicates whether the logical product variant has been
+   * replaced. If `false`, the variant is active. If `true`, the variant has
+   * been replaced by another type, and the `replacement` field contains the
+   * resource name of that replacement.
+   * 
+ * + * bool replaced = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The replaced. + */ + boolean getReplaced(); + + /** + * + * + *
+   * Output only. The resource name of the Logical Entity that the logical
+   * product variant is replaced by. This field is only populated when this
+   * logical product variant is replaced by some other type. Eg:
+   * logicalProducts/{logical_product}, productSuites/{product_suite}, etc.
+   * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The replacement. + */ + java.lang.String getReplacement(); + + /** + * + * + *
+   * Output only. The resource name of the Logical Entity that the logical
+   * product variant is replaced by. This field is only populated when this
+   * logical product variant is replaced by some other type. Eg:
+   * logicalProducts/{logical_product}, productSuites/{product_suite}, etc.
+   * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for replacement. + */ + com.google.protobuf.ByteString getReplacementBytes(); +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductVariantProto.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductVariantProto.java new file mode 100644 index 000000000000..2da98d49cce3 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LogicalProductVariantProto.java @@ -0,0 +1,108 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/logical_product_variant.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public final class LogicalProductVariantProto extends com.google.protobuf.GeneratedFile { + private LogicalProductVariantProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LogicalProductVariantProto"); + } + + 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_productregistry_v1_LogicalProductVariant_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_productregistry_v1_LogicalProductVariant_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/productregistry/v1/logical_product_variant.proto\022\037google.cloud.pr" + + "oductregistry.v1\032\037google/api/field_behav" + + "ior.proto\032\031google/api/resource.proto\0325go" + + "ogle/cloud/productregistry/v1/lifecycle_state.proto\"\346\002\n" + + "\025LogicalProductVariant\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\r\n" + + "\005title\030\002 \001(\t\022M\n" + + "\017lifecycle_state\030\003" + + " \001(\0162/.google.cloud.productregistry.v1.LifecycleStateB\003\340A\003\022\025\n" + + "\010replaced\030\004 \001(\010B\003\340A\003\022\036\n" + + "\013replacement\030\005 \001(\tB\t\340A\003\372A\003\n" + + "\001*:\244\001\352A\240\001\n" + + "9cloudproductregistry.googleapis.com/LogicalProductVariant\0224logical" + + "Products/{logical_product}/variants/{var" + + "iant}*\026logicalProductVariants2\025logicalProductVariantB\373\001\n" + + "#com.google.cloud.productregistry.v1B\032LogicalProductVariantProto" + + "P\001ZMcloud.google.com/go/productregistry/apiv1/productregistrypb;productregistryp" + + "b\252\002\037Google.Cloud.ProductRegistry.V1\312\002\037Go" + + "ogle\\Cloud\\ProductRegistry\\V1\352\002\"Google::" + + "Cloud::ProductRegistry::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.productregistry.v1.LifecycleStateProto.getDescriptor(), + }); + internal_static_google_cloud_productregistry_v1_LogicalProductVariant_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_productregistry_v1_LogicalProductVariant_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_productregistry_v1_LogicalProductVariant_descriptor, + new java.lang.String[] { + "Name", "Title", "LifecycleState", "Replaced", "Replacement", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.productregistry.v1.LifecycleStateProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LookupEntityRequest.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LookupEntityRequest.java new file mode 100644 index 000000000000..963b83734811 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LookupEntityRequest.java @@ -0,0 +1,625 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +/** + * + * + *
+ * Request message for LookupEntity.
+ * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.LookupEntityRequest} + */ +@com.google.protobuf.Generated +public final class LookupEntityRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.productregistry.v1.LookupEntityRequest) + LookupEntityRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LookupEntityRequest"); + } + + // Use LookupEntityRequest.newBuilder() to construct. + private LookupEntityRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LookupEntityRequest() { + lookupUri_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_LookupEntityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_LookupEntityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.LookupEntityRequest.class, + com.google.cloud.productregistry.v1.LookupEntityRequest.Builder.class); + } + + public static final int LOOKUP_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object lookupUri_ = ""; + + /** + * + * + *
+   * Required. Entity uri to look up.
+   * Supported Formats:
+   * logicalProducts/{logical_product}
+   * logicalProducts/{logical_product}/variants/{variant}
+   * productSuites/{product_suite}
+   * 
+ * + * string lookup_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lookupUri. + */ + @java.lang.Override + public java.lang.String getLookupUri() { + java.lang.Object ref = lookupUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lookupUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Entity uri to look up.
+   * Supported Formats:
+   * logicalProducts/{logical_product}
+   * logicalProducts/{logical_product}/variants/{variant}
+   * productSuites/{product_suite}
+   * 
+ * + * string lookup_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for lookupUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLookupUriBytes() { + java.lang.Object ref = lookupUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lookupUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(lookupUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, lookupUri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(lookupUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, lookupUri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.productregistry.v1.LookupEntityRequest)) { + return super.equals(obj); + } + com.google.cloud.productregistry.v1.LookupEntityRequest other = + (com.google.cloud.productregistry.v1.LookupEntityRequest) obj; + + if (!getLookupUri().equals(other.getLookupUri())) return false; + if (!getUnknownFields().equals(other.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) + LOOKUP_URI_FIELD_NUMBER; + hash = (53 * hash) + getLookupUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.productregistry.v1.LookupEntityRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.LookupEntityRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LookupEntityRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.LookupEntityRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LookupEntityRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.LookupEntityRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LookupEntityRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.LookupEntityRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LookupEntityRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.LookupEntityRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LookupEntityRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.LookupEntityRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.productregistry.v1.LookupEntityRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for LookupEntity.
+   * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.LookupEntityRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.productregistry.v1.LookupEntityRequest) + com.google.cloud.productregistry.v1.LookupEntityRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_LookupEntityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_LookupEntityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.LookupEntityRequest.class, + com.google.cloud.productregistry.v1.LookupEntityRequest.Builder.class); + } + + // Construct using com.google.cloud.productregistry.v1.LookupEntityRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + lookupUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_LookupEntityRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.LookupEntityRequest getDefaultInstanceForType() { + return com.google.cloud.productregistry.v1.LookupEntityRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.LookupEntityRequest build() { + com.google.cloud.productregistry.v1.LookupEntityRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.LookupEntityRequest buildPartial() { + com.google.cloud.productregistry.v1.LookupEntityRequest result = + new com.google.cloud.productregistry.v1.LookupEntityRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.productregistry.v1.LookupEntityRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.lookupUri_ = lookupUri_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.productregistry.v1.LookupEntityRequest) { + return mergeFrom((com.google.cloud.productregistry.v1.LookupEntityRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.productregistry.v1.LookupEntityRequest other) { + if (other == com.google.cloud.productregistry.v1.LookupEntityRequest.getDefaultInstance()) + return this; + if (!other.getLookupUri().isEmpty()) { + lookupUri_ = other.lookupUri_; + 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: + { + lookupUri_ = 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 lookupUri_ = ""; + + /** + * + * + *
+     * Required. Entity uri to look up.
+     * Supported Formats:
+     * logicalProducts/{logical_product}
+     * logicalProducts/{logical_product}/variants/{variant}
+     * productSuites/{product_suite}
+     * 
+ * + * string lookup_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lookupUri. + */ + public java.lang.String getLookupUri() { + java.lang.Object ref = lookupUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lookupUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Entity uri to look up.
+     * Supported Formats:
+     * logicalProducts/{logical_product}
+     * logicalProducts/{logical_product}/variants/{variant}
+     * productSuites/{product_suite}
+     * 
+ * + * string lookup_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for lookupUri. + */ + public com.google.protobuf.ByteString getLookupUriBytes() { + java.lang.Object ref = lookupUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lookupUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Entity uri to look up.
+     * Supported Formats:
+     * logicalProducts/{logical_product}
+     * logicalProducts/{logical_product}/variants/{variant}
+     * productSuites/{product_suite}
+     * 
+ * + * string lookup_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The lookupUri to set. + * @return This builder for chaining. + */ + public Builder setLookupUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + lookupUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Entity uri to look up.
+     * Supported Formats:
+     * logicalProducts/{logical_product}
+     * logicalProducts/{logical_product}/variants/{variant}
+     * productSuites/{product_suite}
+     * 
+ * + * string lookup_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLookupUri() { + lookupUri_ = getDefaultInstance().getLookupUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Entity uri to look up.
+     * Supported Formats:
+     * logicalProducts/{logical_product}
+     * logicalProducts/{logical_product}/variants/{variant}
+     * productSuites/{product_suite}
+     * 
+ * + * string lookup_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for lookupUri to set. + * @return This builder for chaining. + */ + public Builder setLookupUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + lookupUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.productregistry.v1.LookupEntityRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.productregistry.v1.LookupEntityRequest) + private static final com.google.cloud.productregistry.v1.LookupEntityRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.productregistry.v1.LookupEntityRequest(); + } + + public static com.google.cloud.productregistry.v1.LookupEntityRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookupEntityRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.LookupEntityRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LookupEntityRequestOrBuilder.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LookupEntityRequestOrBuilder.java new file mode 100644 index 000000000000..d5bb65172c12 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LookupEntityRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public interface LookupEntityRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.productregistry.v1.LookupEntityRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Entity uri to look up.
+   * Supported Formats:
+   * logicalProducts/{logical_product}
+   * logicalProducts/{logical_product}/variants/{variant}
+   * productSuites/{product_suite}
+   * 
+ * + * string lookup_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The lookupUri. + */ + java.lang.String getLookupUri(); + + /** + * + * + *
+   * Required. Entity uri to look up.
+   * Supported Formats:
+   * logicalProducts/{logical_product}
+   * logicalProducts/{logical_product}/variants/{variant}
+   * productSuites/{product_suite}
+   * 
+ * + * string lookup_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for lookupUri. + */ + com.google.protobuf.ByteString getLookupUriBytes(); +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LookupEntityResponse.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LookupEntityResponse.java new file mode 100644 index 000000000000..2fd8e5f12e75 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LookupEntityResponse.java @@ -0,0 +1,1432 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +/** + * + * + *
+ * Response message for LookupEntity.
+ * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.LookupEntityResponse} + */ +@com.google.protobuf.Generated +public final class LookupEntityResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.productregistry.v1.LookupEntityResponse) + LookupEntityResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LookupEntityResponse"); + } + + // Use LookupEntityResponse.newBuilder() to construct. + private LookupEntityResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LookupEntityResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_LookupEntityResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_LookupEntityResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.LookupEntityResponse.class, + com.google.cloud.productregistry.v1.LookupEntityResponse.Builder.class); + } + + private int entityCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object entity_; + + public enum EntityCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LOGICAL_PRODUCT(1), + LOGICAL_PRODUCT_VARIANT(2), + PRODUCT_SUITE(3), + ENTITY_NOT_SET(0); + private final int value; + + private EntityCase(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 EntityCase valueOf(int value) { + return forNumber(value); + } + + public static EntityCase forNumber(int value) { + switch (value) { + case 1: + return LOGICAL_PRODUCT; + case 2: + return LOGICAL_PRODUCT_VARIANT; + case 3: + return PRODUCT_SUITE; + case 0: + return ENTITY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public EntityCase getEntityCase() { + return EntityCase.forNumber(entityCase_); + } + + public static final int LOGICAL_PRODUCT_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Matched LogicalProduct.
+   * 
+ * + * .google.cloud.productregistry.v1.LogicalProduct logical_product = 1; + * + * @return Whether the logicalProduct field is set. + */ + @java.lang.Override + public boolean hasLogicalProduct() { + return entityCase_ == 1; + } + + /** + * + * + *
+   * Matched LogicalProduct.
+   * 
+ * + * .google.cloud.productregistry.v1.LogicalProduct logical_product = 1; + * + * @return The logicalProduct. + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProduct getLogicalProduct() { + if (entityCase_ == 1) { + return (com.google.cloud.productregistry.v1.LogicalProduct) entity_; + } + return com.google.cloud.productregistry.v1.LogicalProduct.getDefaultInstance(); + } + + /** + * + * + *
+   * Matched LogicalProduct.
+   * 
+ * + * .google.cloud.productregistry.v1.LogicalProduct logical_product = 1; + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProductOrBuilder getLogicalProductOrBuilder() { + if (entityCase_ == 1) { + return (com.google.cloud.productregistry.v1.LogicalProduct) entity_; + } + return com.google.cloud.productregistry.v1.LogicalProduct.getDefaultInstance(); + } + + public static final int LOGICAL_PRODUCT_VARIANT_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Matched LogicalProductVariant.
+   * 
+ * + * .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variant = 2; + * + * + * @return Whether the logicalProductVariant field is set. + */ + @java.lang.Override + public boolean hasLogicalProductVariant() { + return entityCase_ == 2; + } + + /** + * + * + *
+   * Matched LogicalProductVariant.
+   * 
+ * + * .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variant = 2; + * + * + * @return The logicalProductVariant. + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProductVariant getLogicalProductVariant() { + if (entityCase_ == 2) { + return (com.google.cloud.productregistry.v1.LogicalProductVariant) entity_; + } + return com.google.cloud.productregistry.v1.LogicalProductVariant.getDefaultInstance(); + } + + /** + * + * + *
+   * Matched LogicalProductVariant.
+   * 
+ * + * .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variant = 2; + * + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProductVariantOrBuilder + getLogicalProductVariantOrBuilder() { + if (entityCase_ == 2) { + return (com.google.cloud.productregistry.v1.LogicalProductVariant) entity_; + } + return com.google.cloud.productregistry.v1.LogicalProductVariant.getDefaultInstance(); + } + + public static final int PRODUCT_SUITE_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Matched ProductSuite.
+   * 
+ * + * .google.cloud.productregistry.v1.ProductSuite product_suite = 3; + * + * @return Whether the productSuite field is set. + */ + @java.lang.Override + public boolean hasProductSuite() { + return entityCase_ == 3; + } + + /** + * + * + *
+   * Matched ProductSuite.
+   * 
+ * + * .google.cloud.productregistry.v1.ProductSuite product_suite = 3; + * + * @return The productSuite. + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.ProductSuite getProductSuite() { + if (entityCase_ == 3) { + return (com.google.cloud.productregistry.v1.ProductSuite) entity_; + } + return com.google.cloud.productregistry.v1.ProductSuite.getDefaultInstance(); + } + + /** + * + * + *
+   * Matched ProductSuite.
+   * 
+ * + * .google.cloud.productregistry.v1.ProductSuite product_suite = 3; + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.ProductSuiteOrBuilder getProductSuiteOrBuilder() { + if (entityCase_ == 3) { + return (com.google.cloud.productregistry.v1.ProductSuite) entity_; + } + return com.google.cloud.productregistry.v1.ProductSuite.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 (entityCase_ == 1) { + output.writeMessage(1, (com.google.cloud.productregistry.v1.LogicalProduct) entity_); + } + if (entityCase_ == 2) { + output.writeMessage(2, (com.google.cloud.productregistry.v1.LogicalProductVariant) entity_); + } + if (entityCase_ == 3) { + output.writeMessage(3, (com.google.cloud.productregistry.v1.ProductSuite) entity_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (entityCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.productregistry.v1.LogicalProduct) entity_); + } + if (entityCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.productregistry.v1.LogicalProductVariant) entity_); + } + if (entityCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.productregistry.v1.ProductSuite) entity_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.productregistry.v1.LookupEntityResponse)) { + return super.equals(obj); + } + com.google.cloud.productregistry.v1.LookupEntityResponse other = + (com.google.cloud.productregistry.v1.LookupEntityResponse) obj; + + if (!getEntityCase().equals(other.getEntityCase())) return false; + switch (entityCase_) { + case 1: + if (!getLogicalProduct().equals(other.getLogicalProduct())) return false; + break; + case 2: + if (!getLogicalProductVariant().equals(other.getLogicalProductVariant())) return false; + break; + case 3: + if (!getProductSuite().equals(other.getProductSuite())) 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 (entityCase_) { + case 1: + hash = (37 * hash) + LOGICAL_PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getLogicalProduct().hashCode(); + break; + case 2: + hash = (37 * hash) + LOGICAL_PRODUCT_VARIANT_FIELD_NUMBER; + hash = (53 * hash) + getLogicalProductVariant().hashCode(); + break; + case 3: + hash = (37 * hash) + PRODUCT_SUITE_FIELD_NUMBER; + hash = (53 * hash) + getProductSuite().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.productregistry.v1.LookupEntityResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.LookupEntityResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LookupEntityResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.LookupEntityResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LookupEntityResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.LookupEntityResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LookupEntityResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.LookupEntityResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LookupEntityResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.LookupEntityResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.LookupEntityResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.LookupEntityResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.productregistry.v1.LookupEntityResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message for LookupEntity.
+   * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.LookupEntityResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.productregistry.v1.LookupEntityResponse) + com.google.cloud.productregistry.v1.LookupEntityResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_LookupEntityResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_LookupEntityResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.LookupEntityResponse.class, + com.google.cloud.productregistry.v1.LookupEntityResponse.Builder.class); + } + + // Construct using com.google.cloud.productregistry.v1.LookupEntityResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (logicalProductBuilder_ != null) { + logicalProductBuilder_.clear(); + } + if (logicalProductVariantBuilder_ != null) { + logicalProductVariantBuilder_.clear(); + } + if (productSuiteBuilder_ != null) { + productSuiteBuilder_.clear(); + } + entityCase_ = 0; + entity_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceProto + .internal_static_google_cloud_productregistry_v1_LookupEntityResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.LookupEntityResponse getDefaultInstanceForType() { + return com.google.cloud.productregistry.v1.LookupEntityResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.LookupEntityResponse build() { + com.google.cloud.productregistry.v1.LookupEntityResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.LookupEntityResponse buildPartial() { + com.google.cloud.productregistry.v1.LookupEntityResponse result = + new com.google.cloud.productregistry.v1.LookupEntityResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.productregistry.v1.LookupEntityResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.productregistry.v1.LookupEntityResponse result) { + result.entityCase_ = entityCase_; + result.entity_ = this.entity_; + if (entityCase_ == 1 && logicalProductBuilder_ != null) { + result.entity_ = logicalProductBuilder_.build(); + } + if (entityCase_ == 2 && logicalProductVariantBuilder_ != null) { + result.entity_ = logicalProductVariantBuilder_.build(); + } + if (entityCase_ == 3 && productSuiteBuilder_ != null) { + result.entity_ = productSuiteBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.productregistry.v1.LookupEntityResponse) { + return mergeFrom((com.google.cloud.productregistry.v1.LookupEntityResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.productregistry.v1.LookupEntityResponse other) { + if (other == com.google.cloud.productregistry.v1.LookupEntityResponse.getDefaultInstance()) + return this; + switch (other.getEntityCase()) { + case LOGICAL_PRODUCT: + { + mergeLogicalProduct(other.getLogicalProduct()); + break; + } + case LOGICAL_PRODUCT_VARIANT: + { + mergeLogicalProductVariant(other.getLogicalProductVariant()); + break; + } + case PRODUCT_SUITE: + { + mergeProductSuite(other.getProductSuite()); + break; + } + case ENTITY_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( + internalGetLogicalProductFieldBuilder().getBuilder(), extensionRegistry); + entityCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetLogicalProductVariantFieldBuilder().getBuilder(), extensionRegistry); + entityCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetProductSuiteFieldBuilder().getBuilder(), extensionRegistry); + entityCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int entityCase_ = 0; + private java.lang.Object entity_; + + public EntityCase getEntityCase() { + return EntityCase.forNumber(entityCase_); + } + + public Builder clearEntity() { + entityCase_ = 0; + entity_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.productregistry.v1.LogicalProduct, + com.google.cloud.productregistry.v1.LogicalProduct.Builder, + com.google.cloud.productregistry.v1.LogicalProductOrBuilder> + logicalProductBuilder_; + + /** + * + * + *
+     * Matched LogicalProduct.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProduct logical_product = 1; + * + * @return Whether the logicalProduct field is set. + */ + @java.lang.Override + public boolean hasLogicalProduct() { + return entityCase_ == 1; + } + + /** + * + * + *
+     * Matched LogicalProduct.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProduct logical_product = 1; + * + * @return The logicalProduct. + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProduct getLogicalProduct() { + if (logicalProductBuilder_ == null) { + if (entityCase_ == 1) { + return (com.google.cloud.productregistry.v1.LogicalProduct) entity_; + } + return com.google.cloud.productregistry.v1.LogicalProduct.getDefaultInstance(); + } else { + if (entityCase_ == 1) { + return logicalProductBuilder_.getMessage(); + } + return com.google.cloud.productregistry.v1.LogicalProduct.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Matched LogicalProduct.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProduct logical_product = 1; + */ + public Builder setLogicalProduct(com.google.cloud.productregistry.v1.LogicalProduct value) { + if (logicalProductBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entity_ = value; + onChanged(); + } else { + logicalProductBuilder_.setMessage(value); + } + entityCase_ = 1; + return this; + } + + /** + * + * + *
+     * Matched LogicalProduct.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProduct logical_product = 1; + */ + public Builder setLogicalProduct( + com.google.cloud.productregistry.v1.LogicalProduct.Builder builderForValue) { + if (logicalProductBuilder_ == null) { + entity_ = builderForValue.build(); + onChanged(); + } else { + logicalProductBuilder_.setMessage(builderForValue.build()); + } + entityCase_ = 1; + return this; + } + + /** + * + * + *
+     * Matched LogicalProduct.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProduct logical_product = 1; + */ + public Builder mergeLogicalProduct(com.google.cloud.productregistry.v1.LogicalProduct value) { + if (logicalProductBuilder_ == null) { + if (entityCase_ == 1 + && entity_ != com.google.cloud.productregistry.v1.LogicalProduct.getDefaultInstance()) { + entity_ = + com.google.cloud.productregistry.v1.LogicalProduct.newBuilder( + (com.google.cloud.productregistry.v1.LogicalProduct) entity_) + .mergeFrom(value) + .buildPartial(); + } else { + entity_ = value; + } + onChanged(); + } else { + if (entityCase_ == 1) { + logicalProductBuilder_.mergeFrom(value); + } else { + logicalProductBuilder_.setMessage(value); + } + } + entityCase_ = 1; + return this; + } + + /** + * + * + *
+     * Matched LogicalProduct.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProduct logical_product = 1; + */ + public Builder clearLogicalProduct() { + if (logicalProductBuilder_ == null) { + if (entityCase_ == 1) { + entityCase_ = 0; + entity_ = null; + onChanged(); + } + } else { + if (entityCase_ == 1) { + entityCase_ = 0; + entity_ = null; + } + logicalProductBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProduct.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProduct logical_product = 1; + */ + public com.google.cloud.productregistry.v1.LogicalProduct.Builder getLogicalProductBuilder() { + return internalGetLogicalProductFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Matched LogicalProduct.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProduct logical_product = 1; + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProductOrBuilder + getLogicalProductOrBuilder() { + if ((entityCase_ == 1) && (logicalProductBuilder_ != null)) { + return logicalProductBuilder_.getMessageOrBuilder(); + } else { + if (entityCase_ == 1) { + return (com.google.cloud.productregistry.v1.LogicalProduct) entity_; + } + return com.google.cloud.productregistry.v1.LogicalProduct.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Matched LogicalProduct.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProduct logical_product = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.productregistry.v1.LogicalProduct, + com.google.cloud.productregistry.v1.LogicalProduct.Builder, + com.google.cloud.productregistry.v1.LogicalProductOrBuilder> + internalGetLogicalProductFieldBuilder() { + if (logicalProductBuilder_ == null) { + if (!(entityCase_ == 1)) { + entity_ = com.google.cloud.productregistry.v1.LogicalProduct.getDefaultInstance(); + } + logicalProductBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.productregistry.v1.LogicalProduct, + com.google.cloud.productregistry.v1.LogicalProduct.Builder, + com.google.cloud.productregistry.v1.LogicalProductOrBuilder>( + (com.google.cloud.productregistry.v1.LogicalProduct) entity_, + getParentForChildren(), + isClean()); + entity_ = null; + } + entityCase_ = 1; + onChanged(); + return logicalProductBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.productregistry.v1.LogicalProductVariant, + com.google.cloud.productregistry.v1.LogicalProductVariant.Builder, + com.google.cloud.productregistry.v1.LogicalProductVariantOrBuilder> + logicalProductVariantBuilder_; + + /** + * + * + *
+     * Matched LogicalProductVariant.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variant = 2; + * + * + * @return Whether the logicalProductVariant field is set. + */ + @java.lang.Override + public boolean hasLogicalProductVariant() { + return entityCase_ == 2; + } + + /** + * + * + *
+     * Matched LogicalProductVariant.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variant = 2; + * + * + * @return The logicalProductVariant. + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProductVariant getLogicalProductVariant() { + if (logicalProductVariantBuilder_ == null) { + if (entityCase_ == 2) { + return (com.google.cloud.productregistry.v1.LogicalProductVariant) entity_; + } + return com.google.cloud.productregistry.v1.LogicalProductVariant.getDefaultInstance(); + } else { + if (entityCase_ == 2) { + return logicalProductVariantBuilder_.getMessage(); + } + return com.google.cloud.productregistry.v1.LogicalProductVariant.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Matched LogicalProductVariant.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variant = 2; + * + */ + public Builder setLogicalProductVariant( + com.google.cloud.productregistry.v1.LogicalProductVariant value) { + if (logicalProductVariantBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entity_ = value; + onChanged(); + } else { + logicalProductVariantBuilder_.setMessage(value); + } + entityCase_ = 2; + return this; + } + + /** + * + * + *
+     * Matched LogicalProductVariant.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variant = 2; + * + */ + public Builder setLogicalProductVariant( + com.google.cloud.productregistry.v1.LogicalProductVariant.Builder builderForValue) { + if (logicalProductVariantBuilder_ == null) { + entity_ = builderForValue.build(); + onChanged(); + } else { + logicalProductVariantBuilder_.setMessage(builderForValue.build()); + } + entityCase_ = 2; + return this; + } + + /** + * + * + *
+     * Matched LogicalProductVariant.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variant = 2; + * + */ + public Builder mergeLogicalProductVariant( + com.google.cloud.productregistry.v1.LogicalProductVariant value) { + if (logicalProductVariantBuilder_ == null) { + if (entityCase_ == 2 + && entity_ + != com.google.cloud.productregistry.v1.LogicalProductVariant.getDefaultInstance()) { + entity_ = + com.google.cloud.productregistry.v1.LogicalProductVariant.newBuilder( + (com.google.cloud.productregistry.v1.LogicalProductVariant) entity_) + .mergeFrom(value) + .buildPartial(); + } else { + entity_ = value; + } + onChanged(); + } else { + if (entityCase_ == 2) { + logicalProductVariantBuilder_.mergeFrom(value); + } else { + logicalProductVariantBuilder_.setMessage(value); + } + } + entityCase_ = 2; + return this; + } + + /** + * + * + *
+     * Matched LogicalProductVariant.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variant = 2; + * + */ + public Builder clearLogicalProductVariant() { + if (logicalProductVariantBuilder_ == null) { + if (entityCase_ == 2) { + entityCase_ = 0; + entity_ = null; + onChanged(); + } + } else { + if (entityCase_ == 2) { + entityCase_ = 0; + entity_ = null; + } + logicalProductVariantBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Matched LogicalProductVariant.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variant = 2; + * + */ + public com.google.cloud.productregistry.v1.LogicalProductVariant.Builder + getLogicalProductVariantBuilder() { + return internalGetLogicalProductVariantFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Matched LogicalProductVariant.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variant = 2; + * + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.LogicalProductVariantOrBuilder + getLogicalProductVariantOrBuilder() { + if ((entityCase_ == 2) && (logicalProductVariantBuilder_ != null)) { + return logicalProductVariantBuilder_.getMessageOrBuilder(); + } else { + if (entityCase_ == 2) { + return (com.google.cloud.productregistry.v1.LogicalProductVariant) entity_; + } + return com.google.cloud.productregistry.v1.LogicalProductVariant.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Matched LogicalProductVariant.
+     * 
+ * + * .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variant = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.productregistry.v1.LogicalProductVariant, + com.google.cloud.productregistry.v1.LogicalProductVariant.Builder, + com.google.cloud.productregistry.v1.LogicalProductVariantOrBuilder> + internalGetLogicalProductVariantFieldBuilder() { + if (logicalProductVariantBuilder_ == null) { + if (!(entityCase_ == 2)) { + entity_ = com.google.cloud.productregistry.v1.LogicalProductVariant.getDefaultInstance(); + } + logicalProductVariantBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.productregistry.v1.LogicalProductVariant, + com.google.cloud.productregistry.v1.LogicalProductVariant.Builder, + com.google.cloud.productregistry.v1.LogicalProductVariantOrBuilder>( + (com.google.cloud.productregistry.v1.LogicalProductVariant) entity_, + getParentForChildren(), + isClean()); + entity_ = null; + } + entityCase_ = 2; + onChanged(); + return logicalProductVariantBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.productregistry.v1.ProductSuite, + com.google.cloud.productregistry.v1.ProductSuite.Builder, + com.google.cloud.productregistry.v1.ProductSuiteOrBuilder> + productSuiteBuilder_; + + /** + * + * + *
+     * Matched ProductSuite.
+     * 
+ * + * .google.cloud.productregistry.v1.ProductSuite product_suite = 3; + * + * @return Whether the productSuite field is set. + */ + @java.lang.Override + public boolean hasProductSuite() { + return entityCase_ == 3; + } + + /** + * + * + *
+     * Matched ProductSuite.
+     * 
+ * + * .google.cloud.productregistry.v1.ProductSuite product_suite = 3; + * + * @return The productSuite. + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.ProductSuite getProductSuite() { + if (productSuiteBuilder_ == null) { + if (entityCase_ == 3) { + return (com.google.cloud.productregistry.v1.ProductSuite) entity_; + } + return com.google.cloud.productregistry.v1.ProductSuite.getDefaultInstance(); + } else { + if (entityCase_ == 3) { + return productSuiteBuilder_.getMessage(); + } + return com.google.cloud.productregistry.v1.ProductSuite.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Matched ProductSuite.
+     * 
+ * + * .google.cloud.productregistry.v1.ProductSuite product_suite = 3; + */ + public Builder setProductSuite(com.google.cloud.productregistry.v1.ProductSuite value) { + if (productSuiteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entity_ = value; + onChanged(); + } else { + productSuiteBuilder_.setMessage(value); + } + entityCase_ = 3; + return this; + } + + /** + * + * + *
+     * Matched ProductSuite.
+     * 
+ * + * .google.cloud.productregistry.v1.ProductSuite product_suite = 3; + */ + public Builder setProductSuite( + com.google.cloud.productregistry.v1.ProductSuite.Builder builderForValue) { + if (productSuiteBuilder_ == null) { + entity_ = builderForValue.build(); + onChanged(); + } else { + productSuiteBuilder_.setMessage(builderForValue.build()); + } + entityCase_ = 3; + return this; + } + + /** + * + * + *
+     * Matched ProductSuite.
+     * 
+ * + * .google.cloud.productregistry.v1.ProductSuite product_suite = 3; + */ + public Builder mergeProductSuite(com.google.cloud.productregistry.v1.ProductSuite value) { + if (productSuiteBuilder_ == null) { + if (entityCase_ == 3 + && entity_ != com.google.cloud.productregistry.v1.ProductSuite.getDefaultInstance()) { + entity_ = + com.google.cloud.productregistry.v1.ProductSuite.newBuilder( + (com.google.cloud.productregistry.v1.ProductSuite) entity_) + .mergeFrom(value) + .buildPartial(); + } else { + entity_ = value; + } + onChanged(); + } else { + if (entityCase_ == 3) { + productSuiteBuilder_.mergeFrom(value); + } else { + productSuiteBuilder_.setMessage(value); + } + } + entityCase_ = 3; + return this; + } + + /** + * + * + *
+     * Matched ProductSuite.
+     * 
+ * + * .google.cloud.productregistry.v1.ProductSuite product_suite = 3; + */ + public Builder clearProductSuite() { + if (productSuiteBuilder_ == null) { + if (entityCase_ == 3) { + entityCase_ = 0; + entity_ = null; + onChanged(); + } + } else { + if (entityCase_ == 3) { + entityCase_ = 0; + entity_ = null; + } + productSuiteBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Matched ProductSuite.
+     * 
+ * + * .google.cloud.productregistry.v1.ProductSuite product_suite = 3; + */ + public com.google.cloud.productregistry.v1.ProductSuite.Builder getProductSuiteBuilder() { + return internalGetProductSuiteFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Matched ProductSuite.
+     * 
+ * + * .google.cloud.productregistry.v1.ProductSuite product_suite = 3; + */ + @java.lang.Override + public com.google.cloud.productregistry.v1.ProductSuiteOrBuilder getProductSuiteOrBuilder() { + if ((entityCase_ == 3) && (productSuiteBuilder_ != null)) { + return productSuiteBuilder_.getMessageOrBuilder(); + } else { + if (entityCase_ == 3) { + return (com.google.cloud.productregistry.v1.ProductSuite) entity_; + } + return com.google.cloud.productregistry.v1.ProductSuite.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Matched ProductSuite.
+     * 
+ * + * .google.cloud.productregistry.v1.ProductSuite product_suite = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.productregistry.v1.ProductSuite, + com.google.cloud.productregistry.v1.ProductSuite.Builder, + com.google.cloud.productregistry.v1.ProductSuiteOrBuilder> + internalGetProductSuiteFieldBuilder() { + if (productSuiteBuilder_ == null) { + if (!(entityCase_ == 3)) { + entity_ = com.google.cloud.productregistry.v1.ProductSuite.getDefaultInstance(); + } + productSuiteBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.productregistry.v1.ProductSuite, + com.google.cloud.productregistry.v1.ProductSuite.Builder, + com.google.cloud.productregistry.v1.ProductSuiteOrBuilder>( + (com.google.cloud.productregistry.v1.ProductSuite) entity_, + getParentForChildren(), + isClean()); + entity_ = null; + } + entityCase_ = 3; + onChanged(); + return productSuiteBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.productregistry.v1.LookupEntityResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.productregistry.v1.LookupEntityResponse) + private static final com.google.cloud.productregistry.v1.LookupEntityResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.productregistry.v1.LookupEntityResponse(); + } + + public static com.google.cloud.productregistry.v1.LookupEntityResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LookupEntityResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.LookupEntityResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LookupEntityResponseOrBuilder.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LookupEntityResponseOrBuilder.java new file mode 100644 index 000000000000..3f5e30cb3d3c --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/LookupEntityResponseOrBuilder.java @@ -0,0 +1,145 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public interface LookupEntityResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.productregistry.v1.LookupEntityResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Matched LogicalProduct.
+   * 
+ * + * .google.cloud.productregistry.v1.LogicalProduct logical_product = 1; + * + * @return Whether the logicalProduct field is set. + */ + boolean hasLogicalProduct(); + + /** + * + * + *
+   * Matched LogicalProduct.
+   * 
+ * + * .google.cloud.productregistry.v1.LogicalProduct logical_product = 1; + * + * @return The logicalProduct. + */ + com.google.cloud.productregistry.v1.LogicalProduct getLogicalProduct(); + + /** + * + * + *
+   * Matched LogicalProduct.
+   * 
+ * + * .google.cloud.productregistry.v1.LogicalProduct logical_product = 1; + */ + com.google.cloud.productregistry.v1.LogicalProductOrBuilder getLogicalProductOrBuilder(); + + /** + * + * + *
+   * Matched LogicalProductVariant.
+   * 
+ * + * .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variant = 2; + * + * + * @return Whether the logicalProductVariant field is set. + */ + boolean hasLogicalProductVariant(); + + /** + * + * + *
+   * Matched LogicalProductVariant.
+   * 
+ * + * .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variant = 2; + * + * + * @return The logicalProductVariant. + */ + com.google.cloud.productregistry.v1.LogicalProductVariant getLogicalProductVariant(); + + /** + * + * + *
+   * Matched LogicalProductVariant.
+   * 
+ * + * .google.cloud.productregistry.v1.LogicalProductVariant logical_product_variant = 2; + * + */ + com.google.cloud.productregistry.v1.LogicalProductVariantOrBuilder + getLogicalProductVariantOrBuilder(); + + /** + * + * + *
+   * Matched ProductSuite.
+   * 
+ * + * .google.cloud.productregistry.v1.ProductSuite product_suite = 3; + * + * @return Whether the productSuite field is set. + */ + boolean hasProductSuite(); + + /** + * + * + *
+   * Matched ProductSuite.
+   * 
+ * + * .google.cloud.productregistry.v1.ProductSuite product_suite = 3; + * + * @return The productSuite. + */ + com.google.cloud.productregistry.v1.ProductSuite getProductSuite(); + + /** + * + * + *
+   * Matched ProductSuite.
+   * 
+ * + * .google.cloud.productregistry.v1.ProductSuite product_suite = 3; + */ + com.google.cloud.productregistry.v1.ProductSuiteOrBuilder getProductSuiteOrBuilder(); + + com.google.cloud.productregistry.v1.LookupEntityResponse.EntityCase getEntityCase(); +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ProductSuite.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ProductSuite.java new file mode 100644 index 000000000000..e8bbad00c43a --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ProductSuite.java @@ -0,0 +1,1456 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/product_suite.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +/** + * + * + *
+ * Represents a unified grouping of products sharing a common brand and market
+ * positioning.
+ * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.ProductSuite} + */ +@com.google.protobuf.Generated +public final class ProductSuite extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.productregistry.v1.ProductSuite) + ProductSuiteOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ProductSuite"); + } + + // Use ProductSuite.newBuilder() to construct. + private ProductSuite(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ProductSuite() { + name_ = ""; + title_ = ""; + logicalProducts_ = com.google.protobuf.LazyStringArrayList.emptyList(); + replacement_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.ProductSuiteProto + .internal_static_google_cloud_productregistry_v1_ProductSuite_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.ProductSuiteProto + .internal_static_google_cloud_productregistry_v1_ProductSuite_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.ProductSuite.class, + com.google.cloud.productregistry.v1.ProductSuite.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the ProductSuite.
+   * Format: productSuites/{product_suite}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The resource name of the ProductSuite.
+   * Format: productSuites/{product_suite}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TITLE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + + /** + * + * + *
+   * Title of the ProductSuite.
+   * 
+ * + * string title = 2; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + + /** + * + * + *
+   * Title of the ProductSuite.
+   * 
+ * + * string title = 2; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOGICAL_PRODUCTS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList logicalProducts_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. LogicalProducts under this suite.
+   * Format: logicalProducts/{logical_product}
+   * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the logicalProducts. + */ + public com.google.protobuf.ProtocolStringList getLogicalProductsList() { + return logicalProducts_; + } + + /** + * + * + *
+   * Output only. LogicalProducts under this suite.
+   * Format: logicalProducts/{logical_product}
+   * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of logicalProducts. + */ + public int getLogicalProductsCount() { + return logicalProducts_.size(); + } + + /** + * + * + *
+   * Output only. LogicalProducts under this suite.
+   * Format: logicalProducts/{logical_product}
+   * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The logicalProducts at the given index. + */ + public java.lang.String getLogicalProducts(int index) { + return logicalProducts_.get(index); + } + + /** + * + * + *
+   * Output only. LogicalProducts under this suite.
+   * Format: logicalProducts/{logical_product}
+   * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the logicalProducts at the given index. + */ + public com.google.protobuf.ByteString getLogicalProductsBytes(int index) { + return logicalProducts_.getByteString(index); + } + + public static final int REPLACED_FIELD_NUMBER = 4; + private boolean replaced_ = false; + + /** + * + * + *
+   * Output only. Indicates whether the product suite has been replaced. If
+   * `false`, the product suite is active. If `true`, the product suite has been
+   * replaced by another type, and the `replacement` field contains the resource
+   * name of that replacement.
+   * 
+ * + * bool replaced = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The replaced. + */ + @java.lang.Override + public boolean getReplaced() { + return replaced_; + } + + public static final int REPLACEMENT_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object replacement_ = ""; + + /** + * + * + *
+   * Output only. The resource name of the Logical Entity that the product suite
+   * is replaced by. This field is only populated when this product suite is
+   * replaced by some other type. Eg: logicalProducts/{logical_product},
+   * logicalProducts/{logical_product}/variants/{variant}, etc.
+   * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The replacement. + */ + @java.lang.Override + public java.lang.String getReplacement() { + java.lang.Object ref = replacement_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + replacement_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The resource name of the Logical Entity that the product suite
+   * is replaced by. This field is only populated when this product suite is
+   * replaced by some other type. Eg: logicalProducts/{logical_product},
+   * logicalProducts/{logical_product}/variants/{variant}, etc.
+   * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for replacement. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReplacementBytes() { + java.lang.Object ref = replacement_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + replacement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, title_); + } + for (int i = 0; i < logicalProducts_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, logicalProducts_.getRaw(i)); + } + if (replaced_ != false) { + output.writeBool(4, replaced_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(replacement_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, replacement_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, title_); + } + { + int dataSize = 0; + for (int i = 0; i < logicalProducts_.size(); i++) { + dataSize += computeStringSizeNoTag(logicalProducts_.getRaw(i)); + } + size += dataSize; + size += 1 * getLogicalProductsList().size(); + } + if (replaced_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, replaced_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(replacement_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, replacement_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.productregistry.v1.ProductSuite)) { + return super.equals(obj); + } + com.google.cloud.productregistry.v1.ProductSuite other = + (com.google.cloud.productregistry.v1.ProductSuite) obj; + + if (!getName().equals(other.getName())) return false; + if (!getTitle().equals(other.getTitle())) return false; + if (!getLogicalProductsList().equals(other.getLogicalProductsList())) return false; + if (getReplaced() != other.getReplaced()) return false; + if (!getReplacement().equals(other.getReplacement())) return false; + if (!getUnknownFields().equals(other.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) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + if (getLogicalProductsCount() > 0) { + hash = (37 * hash) + LOGICAL_PRODUCTS_FIELD_NUMBER; + hash = (53 * hash) + getLogicalProductsList().hashCode(); + } + hash = (37 * hash) + REPLACED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReplaced()); + hash = (37 * hash) + REPLACEMENT_FIELD_NUMBER; + hash = (53 * hash) + getReplacement().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.productregistry.v1.ProductSuite parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ProductSuite parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ProductSuite parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ProductSuite parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ProductSuite parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.productregistry.v1.ProductSuite parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ProductSuite parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ProductSuite parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ProductSuite parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ProductSuite parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.productregistry.v1.ProductSuite parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.productregistry.v1.ProductSuite parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.productregistry.v1.ProductSuite prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents a unified grouping of products sharing a common brand and market
+   * positioning.
+   * 
+ * + * Protobuf type {@code google.cloud.productregistry.v1.ProductSuite} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.productregistry.v1.ProductSuite) + com.google.cloud.productregistry.v1.ProductSuiteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.productregistry.v1.ProductSuiteProto + .internal_static_google_cloud_productregistry_v1_ProductSuite_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.productregistry.v1.ProductSuiteProto + .internal_static_google_cloud_productregistry_v1_ProductSuite_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.productregistry.v1.ProductSuite.class, + com.google.cloud.productregistry.v1.ProductSuite.Builder.class); + } + + // Construct using com.google.cloud.productregistry.v1.ProductSuite.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + title_ = ""; + logicalProducts_ = com.google.protobuf.LazyStringArrayList.emptyList(); + replaced_ = false; + replacement_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.productregistry.v1.ProductSuiteProto + .internal_static_google_cloud_productregistry_v1_ProductSuite_descriptor; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ProductSuite getDefaultInstanceForType() { + return com.google.cloud.productregistry.v1.ProductSuite.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ProductSuite build() { + com.google.cloud.productregistry.v1.ProductSuite result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ProductSuite buildPartial() { + com.google.cloud.productregistry.v1.ProductSuite result = + new com.google.cloud.productregistry.v1.ProductSuite(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.productregistry.v1.ProductSuite result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + logicalProducts_.makeImmutable(); + result.logicalProducts_ = logicalProducts_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.replaced_ = replaced_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.replacement_ = replacement_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.productregistry.v1.ProductSuite) { + return mergeFrom((com.google.cloud.productregistry.v1.ProductSuite) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.productregistry.v1.ProductSuite other) { + if (other == com.google.cloud.productregistry.v1.ProductSuite.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.logicalProducts_.isEmpty()) { + if (logicalProducts_.isEmpty()) { + logicalProducts_ = other.logicalProducts_; + bitField0_ |= 0x00000004; + } else { + ensureLogicalProductsIsMutable(); + logicalProducts_.addAll(other.logicalProducts_); + } + onChanged(); + } + if (other.getReplaced() != false) { + setReplaced(other.getReplaced()); + } + if (!other.getReplacement().isEmpty()) { + replacement_ = other.replacement_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLogicalProductsIsMutable(); + logicalProducts_.add(s); + break; + } // case 26 + case 32: + { + replaced_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + replacement_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the ProductSuite.
+     * Format: productSuites/{product_suite}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the ProductSuite.
+     * Format: productSuites/{product_suite}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The resource name of the ProductSuite.
+     * Format: productSuites/{product_suite}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the ProductSuite.
+     * Format: productSuites/{product_suite}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the ProductSuite.
+     * Format: productSuites/{product_suite}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + + /** + * + * + *
+     * Title of the ProductSuite.
+     * 
+ * + * string title = 2; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Title of the ProductSuite.
+     * 
+ * + * string title = 2; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Title of the ProductSuite.
+     * 
+ * + * string title = 2; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Title of the ProductSuite.
+     * 
+ * + * string title = 2; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Title of the ProductSuite.
+     * 
+ * + * string title = 2; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList logicalProducts_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureLogicalProductsIsMutable() { + if (!logicalProducts_.isModifiable()) { + logicalProducts_ = new com.google.protobuf.LazyStringArrayList(logicalProducts_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Output only. LogicalProducts under this suite.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the logicalProducts. + */ + public com.google.protobuf.ProtocolStringList getLogicalProductsList() { + logicalProducts_.makeImmutable(); + return logicalProducts_; + } + + /** + * + * + *
+     * Output only. LogicalProducts under this suite.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of logicalProducts. + */ + public int getLogicalProductsCount() { + return logicalProducts_.size(); + } + + /** + * + * + *
+     * Output only. LogicalProducts under this suite.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The logicalProducts at the given index. + */ + public java.lang.String getLogicalProducts(int index) { + return logicalProducts_.get(index); + } + + /** + * + * + *
+     * Output only. LogicalProducts under this suite.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the logicalProducts at the given index. + */ + public com.google.protobuf.ByteString getLogicalProductsBytes(int index) { + return logicalProducts_.getByteString(index); + } + + /** + * + * + *
+     * Output only. LogicalProducts under this suite.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The logicalProducts to set. + * @return This builder for chaining. + */ + public Builder setLogicalProducts(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalProductsIsMutable(); + logicalProducts_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. LogicalProducts under this suite.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The logicalProducts to add. + * @return This builder for chaining. + */ + public Builder addLogicalProducts(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogicalProductsIsMutable(); + logicalProducts_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. LogicalProducts under this suite.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param values The logicalProducts to add. + * @return This builder for chaining. + */ + public Builder addAllLogicalProducts(java.lang.Iterable values) { + ensureLogicalProductsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, logicalProducts_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. LogicalProducts under this suite.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearLogicalProducts() { + logicalProducts_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. LogicalProducts under this suite.
+     * Format: logicalProducts/{logical_product}
+     * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the logicalProducts to add. + * @return This builder for chaining. + */ + public Builder addLogicalProductsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLogicalProductsIsMutable(); + logicalProducts_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean replaced_; + + /** + * + * + *
+     * Output only. Indicates whether the product suite has been replaced. If
+     * `false`, the product suite is active. If `true`, the product suite has been
+     * replaced by another type, and the `replacement` field contains the resource
+     * name of that replacement.
+     * 
+ * + * bool replaced = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The replaced. + */ + @java.lang.Override + public boolean getReplaced() { + return replaced_; + } + + /** + * + * + *
+     * Output only. Indicates whether the product suite has been replaced. If
+     * `false`, the product suite is active. If `true`, the product suite has been
+     * replaced by another type, and the `replacement` field contains the resource
+     * name of that replacement.
+     * 
+ * + * bool replaced = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The replaced to set. + * @return This builder for chaining. + */ + public Builder setReplaced(boolean value) { + + replaced_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Indicates whether the product suite has been replaced. If
+     * `false`, the product suite is active. If `true`, the product suite has been
+     * replaced by another type, and the `replacement` field contains the resource
+     * name of that replacement.
+     * 
+ * + * bool replaced = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearReplaced() { + bitField0_ = (bitField0_ & ~0x00000008); + replaced_ = false; + onChanged(); + return this; + } + + private java.lang.Object replacement_ = ""; + + /** + * + * + *
+     * Output only. The resource name of the Logical Entity that the product suite
+     * is replaced by. This field is only populated when this product suite is
+     * replaced by some other type. Eg: logicalProducts/{logical_product},
+     * logicalProducts/{logical_product}/variants/{variant}, etc.
+     * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The replacement. + */ + public java.lang.String getReplacement() { + java.lang.Object ref = replacement_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + replacement_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the Logical Entity that the product suite
+     * is replaced by. This field is only populated when this product suite is
+     * replaced by some other type. Eg: logicalProducts/{logical_product},
+     * logicalProducts/{logical_product}/variants/{variant}, etc.
+     * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for replacement. + */ + public com.google.protobuf.ByteString getReplacementBytes() { + java.lang.Object ref = replacement_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + replacement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the Logical Entity that the product suite
+     * is replaced by. This field is only populated when this product suite is
+     * replaced by some other type. Eg: logicalProducts/{logical_product},
+     * logicalProducts/{logical_product}/variants/{variant}, etc.
+     * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The replacement to set. + * @return This builder for chaining. + */ + public Builder setReplacement(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + replacement_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the Logical Entity that the product suite
+     * is replaced by. This field is only populated when this product suite is
+     * replaced by some other type. Eg: logicalProducts/{logical_product},
+     * logicalProducts/{logical_product}/variants/{variant}, etc.
+     * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearReplacement() { + replacement_ = getDefaultInstance().getReplacement(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the Logical Entity that the product suite
+     * is replaced by. This field is only populated when this product suite is
+     * replaced by some other type. Eg: logicalProducts/{logical_product},
+     * logicalProducts/{logical_product}/variants/{variant}, etc.
+     * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for replacement to set. + * @return This builder for chaining. + */ + public Builder setReplacementBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + replacement_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.productregistry.v1.ProductSuite) + } + + // @@protoc_insertion_point(class_scope:google.cloud.productregistry.v1.ProductSuite) + private static final com.google.cloud.productregistry.v1.ProductSuite DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.productregistry.v1.ProductSuite(); + } + + public static com.google.cloud.productregistry.v1.ProductSuite getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductSuite parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.productregistry.v1.ProductSuite getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ProductSuiteName.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ProductSuiteName.java new file mode 100644 index 000000000000..29b8c8e09c78 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ProductSuiteName.java @@ -0,0 +1,171 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.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; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class ProductSuiteName implements ResourceName { + private static final PathTemplate PRODUCT_SUITE = + PathTemplate.createWithoutUrlEncoding("productSuites/{product_suite}"); + private volatile Map fieldValuesMap; + private final String productSuite; + + @Deprecated + protected ProductSuiteName() { + productSuite = null; + } + + private ProductSuiteName(Builder builder) { + productSuite = Preconditions.checkNotNull(builder.getProductSuite()); + } + + public String getProductSuite() { + return productSuite; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProductSuiteName of(String productSuite) { + return newBuilder().setProductSuite(productSuite).build(); + } + + public static String format(String productSuite) { + return newBuilder().setProductSuite(productSuite).build().toString(); + } + + public static @Nullable ProductSuiteName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PRODUCT_SUITE.validatedMatch( + formattedString, "ProductSuiteName.parse: formattedString not in valid format"); + return of(matchMap.get("product_suite")); + } + + 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<@Nullable ProductSuiteName> values) { + List list = new ArrayList<>(values.size()); + for (ProductSuiteName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PRODUCT_SUITE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (productSuite != null) { + fieldMapBuilder.put("product_suite", productSuite); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PRODUCT_SUITE.instantiate("product_suite", productSuite); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ProductSuiteName that = ((ProductSuiteName) o); + return Objects.equals(this.productSuite, that.productSuite); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(productSuite); + return h; + } + + /** Builder for productSuites/{product_suite}. */ + public static class Builder { + private String productSuite; + + protected Builder() {} + + public String getProductSuite() { + return productSuite; + } + + public Builder setProductSuite(String productSuite) { + this.productSuite = productSuite; + return this; + } + + private Builder(ProductSuiteName productSuiteName) { + this.productSuite = productSuiteName.productSuite; + } + + public ProductSuiteName build() { + return new ProductSuiteName(this); + } + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ProductSuiteOrBuilder.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ProductSuiteOrBuilder.java new file mode 100644 index 000000000000..eb0ba11d3437 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ProductSuiteOrBuilder.java @@ -0,0 +1,200 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/product_suite.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public interface ProductSuiteOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.productregistry.v1.ProductSuite) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The resource name of the ProductSuite.
+   * Format: productSuites/{product_suite}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the ProductSuite.
+   * Format: productSuites/{product_suite}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Title of the ProductSuite.
+   * 
+ * + * string title = 2; + * + * @return The title. + */ + java.lang.String getTitle(); + + /** + * + * + *
+   * Title of the ProductSuite.
+   * 
+ * + * string title = 2; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
+   * Output only. LogicalProducts under this suite.
+   * Format: logicalProducts/{logical_product}
+   * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the logicalProducts. + */ + java.util.List getLogicalProductsList(); + + /** + * + * + *
+   * Output only. LogicalProducts under this suite.
+   * Format: logicalProducts/{logical_product}
+   * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of logicalProducts. + */ + int getLogicalProductsCount(); + + /** + * + * + *
+   * Output only. LogicalProducts under this suite.
+   * Format: logicalProducts/{logical_product}
+   * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The logicalProducts at the given index. + */ + java.lang.String getLogicalProducts(int index); + + /** + * + * + *
+   * Output only. LogicalProducts under this suite.
+   * Format: logicalProducts/{logical_product}
+   * 
+ * + * + * repeated string logical_products = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the logicalProducts at the given index. + */ + com.google.protobuf.ByteString getLogicalProductsBytes(int index); + + /** + * + * + *
+   * Output only. Indicates whether the product suite has been replaced. If
+   * `false`, the product suite is active. If `true`, the product suite has been
+   * replaced by another type, and the `replacement` field contains the resource
+   * name of that replacement.
+   * 
+ * + * bool replaced = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The replaced. + */ + boolean getReplaced(); + + /** + * + * + *
+   * Output only. The resource name of the Logical Entity that the product suite
+   * is replaced by. This field is only populated when this product suite is
+   * replaced by some other type. Eg: logicalProducts/{logical_product},
+   * logicalProducts/{logical_product}/variants/{variant}, etc.
+   * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The replacement. + */ + java.lang.String getReplacement(); + + /** + * + * + *
+   * Output only. The resource name of the Logical Entity that the product suite
+   * is replaced by. This field is only populated when this product suite is
+   * replaced by some other type. Eg: logicalProducts/{logical_product},
+   * logicalProducts/{logical_product}/variants/{variant}, etc.
+   * 
+ * + * + * string replacement = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for replacement. + */ + com.google.protobuf.ByteString getReplacementBytes(); +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ProductSuiteProto.java b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ProductSuiteProto.java new file mode 100644 index 000000000000..6fe4a1106f56 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/java/com/google/cloud/productregistry/v1/ProductSuiteProto.java @@ -0,0 +1,104 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/productregistry/v1/product_suite.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.productregistry.v1; + +@com.google.protobuf.Generated +public final class ProductSuiteProto extends com.google.protobuf.GeneratedFile { + private ProductSuiteProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ProductSuiteProto"); + } + + 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_productregistry_v1_ProductSuite_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_productregistry_v1_ProductSuite_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "3google/cloud/productregistry/v1/product_suite.proto\022\037google.cloud.productregis" + + "try.v1\032\037google/api/field_behavior.proto\032\031google/api/resource.proto\"\260\002\n" + + "\014ProductSuite\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\r\n" + + "\005title\030\002 \001(\t\022T\n" + + "\020logical_products\030\003 \003(\tB:\340A\003\372A4\n" + + "2cloudproductregistry.googleapis.com/LogicalProduct\022\025\n" + + "\010replaced\030\004 \001(\010B\003\340A\003\022\036\n" + + "\013replacement\030\005 \001(\tB\t\340A\003\372A\003\n" + + "\001*:q\352An\n" + + "0cloudproductreg" + + "istry.googleapis.com/ProductSuite\022\035productSuites/{product_suite}*\r" + + "productSuites2\014productSuiteB\362\001\n" + + "#com.google.cloud.productregistry.v1B\021ProductSuiteProtoP\001ZMclou" + + "d.google.com/go/productregistry/apiv1/pr" + + "oductregistrypb;productregistrypb\252\002\037Goog" + + "le.Cloud.ProductRegistry.V1\312\002\037Google\\Clo" + + "ud\\ProductRegistry\\V1\352\002\"Google::Cloud::ProductRegistry::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_productregistry_v1_ProductSuite_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_productregistry_v1_ProductSuite_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_productregistry_v1_ProductSuite_descriptor, + new java.lang.String[] { + "Name", "Title", "LogicalProducts", "Replaced", "Replacement", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/cloud_product_registry_read_service.proto b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/cloud_product_registry_read_service.proto new file mode 100644 index 000000000000..f3ce71546cec --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/cloud_product_registry_read_service.proto @@ -0,0 +1,256 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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.productregistry.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/productregistry/v1/logical_product.proto"; +import "google/cloud/productregistry/v1/logical_product_variant.proto"; +import "google/cloud/productregistry/v1/product_suite.proto"; + +option csharp_namespace = "Google.Cloud.ProductRegistry.V1"; +option go_package = "cloud.google.com/go/productregistry/apiv1/productregistrypb;productregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "CloudProductRegistryReadServiceProto"; +option java_package = "com.google.cloud.productregistry.v1"; +option php_namespace = "Google\\Cloud\\ProductRegistry\\V1"; +option ruby_package = "Google::Cloud::ProductRegistry::V1"; + +// Cloud Product Registry Read Service provides capabilities to access all first +// and third party Google Cloud products. +service CloudProductRegistryReadService { + option (google.api.default_host) = "cloudproductregistry.googleapis.com"; + + // Get details of a ProductSuite. + rpc GetProductSuite(GetProductSuiteRequest) returns (ProductSuite) { + option (google.api.http) = { + get: "/v1/{name=productSuites/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists ProductSuites. + rpc ListProductSuites(ListProductSuitesRequest) + returns (ListProductSuitesResponse) { + option (google.api.http) = { + get: "/v1/productSuites" + }; + } + + // Gets details of a LogicalProduct. + rpc GetLogicalProduct(GetLogicalProductRequest) returns (LogicalProduct) { + option (google.api.http) = { + get: "/v1/{name=logicalProducts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists LogicalProducts matching given criteria. + rpc ListLogicalProducts(ListLogicalProductsRequest) + returns (ListLogicalProductsResponse) { + option (google.api.http) = { + get: "/v1/logicalProducts" + }; + } + + // Get details of a LogicalProductVariant. + rpc GetLogicalProductVariant(GetLogicalProductVariantRequest) + returns (LogicalProductVariant) { + option (google.api.http) = { + get: "/v1/{name=logicalProducts/*/variants/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists LogicalProductVariants matching given criteria. + rpc ListLogicalProductVariants(ListLogicalProductVariantsRequest) + returns (ListLogicalProductVariantsResponse) { + option (google.api.http) = { + get: "/v1/{parent=logicalProducts/*}/variants" + }; + option (google.api.method_signature) = "parent"; + } + + // Look up entities. + rpc LookupEntity(LookupEntityRequest) returns (LookupEntityResponse) { + option (google.api.http) = { + get: "/v1/{lookup_uri=logicalProducts/*}:lookupEntity" + additional_bindings { + get: "/v1/{lookup_uri=logicalProducts/*/variants/*}:lookupEntity" + } + additional_bindings { + get: "/v1/{lookup_uri=productSuites/*}:lookupEntity" + } + }; + } +} + +// Request message for GetProductSuite. +message GetProductSuiteRequest { + // Required. The name of the ProductSuite to retrieve. + // Format: productSuites/{product_suite} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudproductregistry.googleapis.com/ProductSuite" + } + ]; +} + +// Request message for GetLogicalProduct. +message GetLogicalProductRequest { + // Required. The name of the LogicalProduct to retrieve. + // Format: logicalProducts/{logical_product} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudproductregistry.googleapis.com/LogicalProduct" + } + ]; +} + +// Request message for GetLogicalProductVariant. +message GetLogicalProductVariantRequest { + // Required. The name of the LogicalProductVariant to retrieve. + // Format: logicalProducts/{logical_product}/variants/{variant} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudproductregistry.googleapis.com/LogicalProductVariant" + } + ]; +} + +// Request message for ListProductSuites. +message ListProductSuitesRequest { + // Optional. The maximum number of suites to return. The service may return + // fewer than this value. If unspecified, at most 100 suites will be returned. + // The maximum value is 500; values above 500 will be coerced to 500. + int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListProductSuites` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListProductSuites` must + // match the call that provided the page token. + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListProductSuites. +message ListProductSuitesResponse { + // Matched ProductSuites + repeated ProductSuite product_suites = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for ListLogicalProducts. +message ListLogicalProductsRequest { + // Optional. The filter expression for listing logical products. + // Filter syntax: https://google.aip.dev/160 + // Supported fields: suite_id + string filter = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of logical products to return. The service may + // return fewer than this value. If unspecified, at most 100 logical products + // will be returned. The maximum value is 500; values above 500 will be + // coerced to 500. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListLogicalProducts` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListLogicalProducts` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListLogicalProducts. +message ListLogicalProductsResponse { + // Matched LogicalProducts + repeated LogicalProduct logical_products = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for ListLogicalProductVariants. +message ListLogicalProductVariantsRequest { + // Required. Parent logical product id. + // Format: logicalProducts/{logical_product} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudproductregistry.googleapis.com/LogicalProductVariant" + } + ]; + + // Optional. The maximum number of logical product variants to return. The + // service may return fewer than this value. If unspecified, at most 100 + // logical product variants will be returned. The maximum value is 500; values + // above 500 will be coerced to 500. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListLogicalProductVariants` call. Provide this to retrieve the subsequent + // page. + // + // When paginating, all other parameters provided to + // `ListLogicalProductVariants` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListLogicalProductVariants. +message ListLogicalProductVariantsResponse { + // Matched LogicalProductVariants + repeated LogicalProductVariant logical_product_variants = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for LookupEntity. +message LookupEntityRequest { + // Required. Entity uri to look up. + // Supported Formats: + // logicalProducts/{logical_product} + // logicalProducts/{logical_product}/variants/{variant} + // productSuites/{product_suite} + string lookup_uri = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for LookupEntity. +message LookupEntityResponse { + // Matched entity. + oneof entity { + // Matched LogicalProduct. + LogicalProduct logical_product = 1; + + // Matched LogicalProductVariant. + LogicalProductVariant logical_product_variant = 2; + + // Matched ProductSuite. + ProductSuite product_suite = 3; + } +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/lifecycle_state.proto b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/lifecycle_state.proto new file mode 100644 index 000000000000..487c8003e475 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/lifecycle_state.proto @@ -0,0 +1,47 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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.productregistry.v1; + +option csharp_namespace = "Google.Cloud.ProductRegistry.V1"; +option go_package = "cloud.google.com/go/productregistry/apiv1/productregistrypb;productregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "LifecycleStateProto"; +option java_package = "com.google.cloud.productregistry.v1"; +option php_namespace = "Google\\Cloud\\ProductRegistry\\V1"; +option ruby_package = "Google::Cloud::ProductRegistry::V1"; + +// Enum representing the lifecycle state of the underlying entity. +enum LifecycleState { + // The default value. This value is used if the lifecycle state is not set. + LIFECYCLE_STATE_UNSPECIFIED = 0; + + // The entity is in Public Preview. It is available to all + // customers, but may not be feature-complete or have full support guarantees. + LIFECYCLE_STATE_PUBLIC_PREVIEW = 1; + + // The entity is in Private General Availability. It is fully + // supported and stable, but only available to a select group of customers. + LIFECYCLE_STATE_PRIVATE_GA = 2; + + // The entity is Generally Available. It is fully supported, stable, and + // available to all customers. + LIFECYCLE_STATE_GA = 3; + + // The entity is deprecated. It is no longer recommended for use + // and may be removed in a future version. + LIFECYCLE_STATE_DEPRECATED = 4; +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/logical_product.proto b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/logical_product.proto new file mode 100644 index 000000000000..d5192974c7aa --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/logical_product.proto @@ -0,0 +1,82 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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.productregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/productregistry/v1/lifecycle_state.proto"; + +option csharp_namespace = "Google.Cloud.ProductRegistry.V1"; +option go_package = "cloud.google.com/go/productregistry/apiv1/productregistrypb;productregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "LogicalProductProto"; +option java_package = "com.google.cloud.productregistry.v1"; +option php_namespace = "Google\\Cloud\\ProductRegistry\\V1"; +option ruby_package = "Google::Cloud::ProductRegistry::V1"; + +// Represents an independent service offering that can be +// provisioned by a customer. +message LogicalProduct { + option (google.api.resource) = { + type: "cloudproductregistry.googleapis.com/LogicalProduct" + pattern: "logicalProducts/{logical_product}" + plural: "logicalProducts" + singular: "logicalProduct" + }; + + // Identifier. The resource name of the LogicalProduct. + // Format: logicalProducts/{logical_product}. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Display name of the LogicalProduct. + string title = 2; + + // Product suite associated with the logical product. + // Format: productSuites/{product_suite}. + string product_suite = 3 [(google.api.resource_reference) = { + type: "cloudproductregistry.googleapis.com/ProductSuite" + }]; + + // Output only. Child variant resource references. + // Format: logicalProducts/{logical_product}/variants/{variant} + repeated string variants = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudproductregistry.googleapis.com/LogicalProductVariant" + } + ]; + + // Output only. Current Lifecycle state of the logical product. + LifecycleState lifecycle_state = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether the logical product has been replaced. If + // `false`, the product is active. If `true`, the product has been replaced by + // another type, and the `replacement` field contains the resource name of + // that replacement. + bool replaced = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the Logical Entity that the logical + // product is replaced by. This field is only populated when this logical + // product is replaced by some other type. Eg: + // logicalProducts/{logical_product}/variants/{variant}, + // productSuites/{product_suite}, etc. + string replacement = 7 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "*" } + ]; +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/logical_product_variant.proto b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/logical_product_variant.proto new file mode 100644 index 000000000000..eb4733396df1 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/logical_product_variant.proto @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.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.productregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/productregistry/v1/lifecycle_state.proto"; + +option csharp_namespace = "Google.Cloud.ProductRegistry.V1"; +option go_package = "cloud.google.com/go/productregistry/apiv1/productregistrypb;productregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "LogicalProductVariantProto"; +option java_package = "com.google.cloud.productregistry.v1"; +option php_namespace = "Google\\Cloud\\ProductRegistry\\V1"; +option ruby_package = "Google::Cloud::ProductRegistry::V1"; + +// Represents a distinct offering derived from a primary product that retains +// core functionalities but offers specialized features for a specific market +// segment. +message LogicalProductVariant { + option (google.api.resource) = { + type: "cloudproductregistry.googleapis.com/LogicalProductVariant" + pattern: "logicalProducts/{logical_product}/variants/{variant}" + plural: "logicalProductVariants" + singular: "logicalProductVariant" + }; + + // Identifier. The resource name of the LogicalProductVariant. + // Format: + // logicalProducts/{logical_product}/variants/{variant} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Display name of the LogicalProductVariant. + string title = 2; + + // Output only. Current Lifecycle state of the logical product variant. + LifecycleState lifecycle_state = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether the logical product variant has been + // replaced. If `false`, the variant is active. If `true`, the variant has + // been replaced by another type, and the `replacement` field contains the + // resource name of that replacement. + bool replaced = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the Logical Entity that the logical + // product variant is replaced by. This field is only populated when this + // logical product variant is replaced by some other type. Eg: + // logicalProducts/{logical_product}, productSuites/{product_suite}, etc. + string replacement = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "*" } + ]; +} diff --git a/java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/product_suite.proto b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/product_suite.proto new file mode 100644 index 000000000000..c75fc9bc4e23 --- /dev/null +++ b/java-productregistry/proto-google-cloud-productregistry-v1/src/main/proto/google/cloud/productregistry/v1/product_suite.proto @@ -0,0 +1,70 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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.productregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.ProductRegistry.V1"; +option go_package = "cloud.google.com/go/productregistry/apiv1/productregistrypb;productregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "ProductSuiteProto"; +option java_package = "com.google.cloud.productregistry.v1"; +option php_namespace = "Google\\Cloud\\ProductRegistry\\V1"; +option ruby_package = "Google::Cloud::ProductRegistry::V1"; + +// Represents a unified grouping of products sharing a common brand and market +// positioning. +message ProductSuite { + option (google.api.resource) = { + type: "cloudproductregistry.googleapis.com/ProductSuite" + pattern: "productSuites/{product_suite}" + plural: "productSuites" + singular: "productSuite" + }; + + // Identifier. The resource name of the ProductSuite. + // Format: productSuites/{product_suite} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Title of the ProductSuite. + string title = 2; + + // Output only. LogicalProducts under this suite. + // Format: logicalProducts/{logical_product} + repeated string logical_products = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudproductregistry.googleapis.com/LogicalProduct" + } + ]; + + // Output only. Indicates whether the product suite has been replaced. If + // `false`, the product suite is active. If `true`, the product suite has been + // replaced by another type, and the `replacement` field contains the resource + // name of that replacement. + bool replaced = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of the Logical Entity that the product suite + // is replaced by. This field is only populated when this product suite is + // replaced by some other type. Eg: logicalProducts/{logical_product}, + // logicalProducts/{logical_product}/variants/{variant}, etc. + string replacement = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "*" } + ]; +} diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/create/SyncCreateSetCredentialsProvider.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..f7b00b13128a --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceSettings; +import com.google.cloud.productregistry.v1.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 + CloudProductRegistryReadServiceSettings cloudProductRegistryReadServiceSettings = + CloudProductRegistryReadServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create(cloudProductRegistryReadServiceSettings); + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_Create_SetCredentialsProvider_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/create/SyncCreateSetEndpoint.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..f04be070462c --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_Create_SetEndpoint_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceSettings; +import com.google.cloud.productregistry.v1.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 + CloudProductRegistryReadServiceSettings cloudProductRegistryReadServiceSettings = + CloudProductRegistryReadServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create(cloudProductRegistryReadServiceSettings); + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_Create_SetEndpoint_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/create/SyncCreateUseHttpJsonTransport.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..86278eb102e6 --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_Create_UseHttpJsonTransport_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudProductRegistryReadServiceSettings cloudProductRegistryReadServiceSettings = + CloudProductRegistryReadServiceSettings.newHttpJsonBuilder().build(); + CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create(cloudProductRegistryReadServiceSettings); + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_Create_UseHttpJsonTransport_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproduct/AsyncGetLogicalProduct.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproduct/AsyncGetLogicalProduct.java new file mode 100644 index 000000000000..a0449bde6a17 --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproduct/AsyncGetLogicalProduct.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProduct_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.GetLogicalProductRequest; +import com.google.cloud.productregistry.v1.LogicalProduct; +import com.google.cloud.productregistry.v1.LogicalProductName; + +public class AsyncGetLogicalProduct { + + public static void main(String[] args) throws Exception { + asyncGetLogicalProduct(); + } + + public static void asyncGetLogicalProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + GetLogicalProductRequest request = + GetLogicalProductRequest.newBuilder() + .setName(LogicalProductName.of("[LOGICAL_PRODUCT]").toString()) + .build(); + ApiFuture future = + cloudProductRegistryReadServiceClient.getLogicalProductCallable().futureCall(request); + // Do something. + LogicalProduct response = future.get(); + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProduct_async] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproduct/SyncGetLogicalProduct.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproduct/SyncGetLogicalProduct.java new file mode 100644 index 000000000000..5a34ed07e213 --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproduct/SyncGetLogicalProduct.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProduct_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.GetLogicalProductRequest; +import com.google.cloud.productregistry.v1.LogicalProduct; +import com.google.cloud.productregistry.v1.LogicalProductName; + +public class SyncGetLogicalProduct { + + public static void main(String[] args) throws Exception { + syncGetLogicalProduct(); + } + + public static void syncGetLogicalProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + GetLogicalProductRequest request = + GetLogicalProductRequest.newBuilder() + .setName(LogicalProductName.of("[LOGICAL_PRODUCT]").toString()) + .build(); + LogicalProduct response = cloudProductRegistryReadServiceClient.getLogicalProduct(request); + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProduct_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproduct/SyncGetLogicalProductLogicalproductname.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproduct/SyncGetLogicalProductLogicalproductname.java new file mode 100644 index 000000000000..9a3ee459a95b --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproduct/SyncGetLogicalProductLogicalproductname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProduct_Logicalproductname_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.LogicalProduct; +import com.google.cloud.productregistry.v1.LogicalProductName; + +public class SyncGetLogicalProductLogicalproductname { + + public static void main(String[] args) throws Exception { + syncGetLogicalProductLogicalproductname(); + } + + public static void syncGetLogicalProductLogicalproductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + LogicalProductName name = LogicalProductName.of("[LOGICAL_PRODUCT]"); + LogicalProduct response = cloudProductRegistryReadServiceClient.getLogicalProduct(name); + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProduct_Logicalproductname_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproduct/SyncGetLogicalProductString.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproduct/SyncGetLogicalProductString.java new file mode 100644 index 000000000000..96178fb9c83c --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproduct/SyncGetLogicalProductString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProduct_String_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.LogicalProduct; +import com.google.cloud.productregistry.v1.LogicalProductName; + +public class SyncGetLogicalProductString { + + public static void main(String[] args) throws Exception { + syncGetLogicalProductString(); + } + + public static void syncGetLogicalProductString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + String name = LogicalProductName.of("[LOGICAL_PRODUCT]").toString(); + LogicalProduct response = cloudProductRegistryReadServiceClient.getLogicalProduct(name); + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProduct_String_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproductvariant/AsyncGetLogicalProductVariant.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproductvariant/AsyncGetLogicalProductVariant.java new file mode 100644 index 000000000000..8122c46fff0a --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproductvariant/AsyncGetLogicalProductVariant.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProductVariant_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest; +import com.google.cloud.productregistry.v1.LogicalProductVariant; +import com.google.cloud.productregistry.v1.LogicalProductVariantName; + +public class AsyncGetLogicalProductVariant { + + public static void main(String[] args) throws Exception { + asyncGetLogicalProductVariant(); + } + + public static void asyncGetLogicalProductVariant() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + GetLogicalProductVariantRequest request = + GetLogicalProductVariantRequest.newBuilder() + .setName(LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]").toString()) + .build(); + ApiFuture future = + cloudProductRegistryReadServiceClient + .getLogicalProductVariantCallable() + .futureCall(request); + // Do something. + LogicalProductVariant response = future.get(); + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProductVariant_async] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproductvariant/SyncGetLogicalProductVariant.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproductvariant/SyncGetLogicalProductVariant.java new file mode 100644 index 000000000000..fad4665afcca --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproductvariant/SyncGetLogicalProductVariant.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProductVariant_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.GetLogicalProductVariantRequest; +import com.google.cloud.productregistry.v1.LogicalProductVariant; +import com.google.cloud.productregistry.v1.LogicalProductVariantName; + +public class SyncGetLogicalProductVariant { + + public static void main(String[] args) throws Exception { + syncGetLogicalProductVariant(); + } + + public static void syncGetLogicalProductVariant() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + GetLogicalProductVariantRequest request = + GetLogicalProductVariantRequest.newBuilder() + .setName(LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]").toString()) + .build(); + LogicalProductVariant response = + cloudProductRegistryReadServiceClient.getLogicalProductVariant(request); + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProductVariant_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproductvariant/SyncGetLogicalProductVariantLogicalproductvariantname.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproductvariant/SyncGetLogicalProductVariantLogicalproductvariantname.java new file mode 100644 index 000000000000..2a78b1b53061 --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproductvariant/SyncGetLogicalProductVariantLogicalproductvariantname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProductVariant_Logicalproductvariantname_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.LogicalProductVariant; +import com.google.cloud.productregistry.v1.LogicalProductVariantName; + +public class SyncGetLogicalProductVariantLogicalproductvariantname { + + public static void main(String[] args) throws Exception { + syncGetLogicalProductVariantLogicalproductvariantname(); + } + + public static void syncGetLogicalProductVariantLogicalproductvariantname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + LogicalProductVariantName name = + LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]"); + LogicalProductVariant response = + cloudProductRegistryReadServiceClient.getLogicalProductVariant(name); + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProductVariant_Logicalproductvariantname_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproductvariant/SyncGetLogicalProductVariantString.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproductvariant/SyncGetLogicalProductVariantString.java new file mode 100644 index 000000000000..64900a916335 --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getlogicalproductvariant/SyncGetLogicalProductVariantString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProductVariant_String_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.LogicalProductVariant; +import com.google.cloud.productregistry.v1.LogicalProductVariantName; + +public class SyncGetLogicalProductVariantString { + + public static void main(String[] args) throws Exception { + syncGetLogicalProductVariantString(); + } + + public static void syncGetLogicalProductVariantString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + String name = LogicalProductVariantName.of("[LOGICAL_PRODUCT]", "[VARIANT]").toString(); + LogicalProductVariant response = + cloudProductRegistryReadServiceClient.getLogicalProductVariant(name); + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProductVariant_String_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getproductsuite/AsyncGetProductSuite.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getproductsuite/AsyncGetProductSuite.java new file mode 100644 index 000000000000..ae5ff824870a --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getproductsuite/AsyncGetProductSuite.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetProductSuite_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.GetProductSuiteRequest; +import com.google.cloud.productregistry.v1.ProductSuite; +import com.google.cloud.productregistry.v1.ProductSuiteName; + +public class AsyncGetProductSuite { + + public static void main(String[] args) throws Exception { + asyncGetProductSuite(); + } + + public static void asyncGetProductSuite() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + GetProductSuiteRequest request = + GetProductSuiteRequest.newBuilder() + .setName(ProductSuiteName.of("[PRODUCT_SUITE]").toString()) + .build(); + ApiFuture future = + cloudProductRegistryReadServiceClient.getProductSuiteCallable().futureCall(request); + // Do something. + ProductSuite response = future.get(); + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetProductSuite_async] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getproductsuite/SyncGetProductSuite.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getproductsuite/SyncGetProductSuite.java new file mode 100644 index 000000000000..1666d143e257 --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getproductsuite/SyncGetProductSuite.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetProductSuite_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.GetProductSuiteRequest; +import com.google.cloud.productregistry.v1.ProductSuite; +import com.google.cloud.productregistry.v1.ProductSuiteName; + +public class SyncGetProductSuite { + + public static void main(String[] args) throws Exception { + syncGetProductSuite(); + } + + public static void syncGetProductSuite() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + GetProductSuiteRequest request = + GetProductSuiteRequest.newBuilder() + .setName(ProductSuiteName.of("[PRODUCT_SUITE]").toString()) + .build(); + ProductSuite response = cloudProductRegistryReadServiceClient.getProductSuite(request); + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetProductSuite_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getproductsuite/SyncGetProductSuiteProductsuitename.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getproductsuite/SyncGetProductSuiteProductsuitename.java new file mode 100644 index 000000000000..40bc9b641950 --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getproductsuite/SyncGetProductSuiteProductsuitename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetProductSuite_Productsuitename_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.ProductSuite; +import com.google.cloud.productregistry.v1.ProductSuiteName; + +public class SyncGetProductSuiteProductsuitename { + + public static void main(String[] args) throws Exception { + syncGetProductSuiteProductsuitename(); + } + + public static void syncGetProductSuiteProductsuitename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + ProductSuiteName name = ProductSuiteName.of("[PRODUCT_SUITE]"); + ProductSuite response = cloudProductRegistryReadServiceClient.getProductSuite(name); + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetProductSuite_Productsuitename_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getproductsuite/SyncGetProductSuiteString.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getproductsuite/SyncGetProductSuiteString.java new file mode 100644 index 000000000000..b56e0a91c70a --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/getproductsuite/SyncGetProductSuiteString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetProductSuite_String_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.ProductSuite; +import com.google.cloud.productregistry.v1.ProductSuiteName; + +public class SyncGetProductSuiteString { + + public static void main(String[] args) throws Exception { + syncGetProductSuiteString(); + } + + public static void syncGetProductSuiteString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + String name = ProductSuiteName.of("[PRODUCT_SUITE]").toString(); + ProductSuite response = cloudProductRegistryReadServiceClient.getProductSuite(name); + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetProductSuite_String_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproducts/AsyncListLogicalProducts.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproducts/AsyncListLogicalProducts.java new file mode 100644 index 000000000000..2a531ac61e52 --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproducts/AsyncListLogicalProducts.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProducts_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.ListLogicalProductsRequest; +import com.google.cloud.productregistry.v1.LogicalProduct; + +public class AsyncListLogicalProducts { + + public static void main(String[] args) throws Exception { + asyncListLogicalProducts(); + } + + public static void asyncListLogicalProducts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + ListLogicalProductsRequest request = + ListLogicalProductsRequest.newBuilder() + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + cloudProductRegistryReadServiceClient + .listLogicalProductsPagedCallable() + .futureCall(request); + // Do something. + for (LogicalProduct element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProducts_async] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproducts/AsyncListLogicalProductsPaged.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproducts/AsyncListLogicalProductsPaged.java new file mode 100644 index 000000000000..f5e1a9c5b81e --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproducts/AsyncListLogicalProductsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProducts_Paged_async] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.ListLogicalProductsRequest; +import com.google.cloud.productregistry.v1.ListLogicalProductsResponse; +import com.google.cloud.productregistry.v1.LogicalProduct; +import com.google.common.base.Strings; + +public class AsyncListLogicalProductsPaged { + + public static void main(String[] args) throws Exception { + asyncListLogicalProductsPaged(); + } + + public static void asyncListLogicalProductsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + ListLogicalProductsRequest request = + ListLogicalProductsRequest.newBuilder() + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLogicalProductsResponse response = + cloudProductRegistryReadServiceClient.listLogicalProductsCallable().call(request); + for (LogicalProduct element : response.getLogicalProductsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProducts_Paged_async] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproducts/SyncListLogicalProducts.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproducts/SyncListLogicalProducts.java new file mode 100644 index 000000000000..8fa413f252d0 --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproducts/SyncListLogicalProducts.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProducts_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.ListLogicalProductsRequest; +import com.google.cloud.productregistry.v1.LogicalProduct; + +public class SyncListLogicalProducts { + + public static void main(String[] args) throws Exception { + syncListLogicalProducts(); + } + + public static void syncListLogicalProducts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + ListLogicalProductsRequest request = + ListLogicalProductsRequest.newBuilder() + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (LogicalProduct element : + cloudProductRegistryReadServiceClient.listLogicalProducts(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProducts_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/AsyncListLogicalProductVariants.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/AsyncListLogicalProductVariants.java new file mode 100644 index 000000000000..236817e53567 --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/AsyncListLogicalProductVariants.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProductVariants_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest; +import com.google.cloud.productregistry.v1.LogicalProductName; +import com.google.cloud.productregistry.v1.LogicalProductVariant; + +public class AsyncListLogicalProductVariants { + + public static void main(String[] args) throws Exception { + asyncListLogicalProductVariants(); + } + + public static void asyncListLogicalProductVariants() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + ListLogicalProductVariantsRequest request = + ListLogicalProductVariantsRequest.newBuilder() + .setParent(LogicalProductName.of("[LOGICAL_PRODUCT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + cloudProductRegistryReadServiceClient + .listLogicalProductVariantsPagedCallable() + .futureCall(request); + // Do something. + for (LogicalProductVariant element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProductVariants_async] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/AsyncListLogicalProductVariantsPaged.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/AsyncListLogicalProductVariantsPaged.java new file mode 100644 index 000000000000..6a70900d2778 --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/AsyncListLogicalProductVariantsPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProductVariants_Paged_async] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest; +import com.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse; +import com.google.cloud.productregistry.v1.LogicalProductName; +import com.google.cloud.productregistry.v1.LogicalProductVariant; +import com.google.common.base.Strings; + +public class AsyncListLogicalProductVariantsPaged { + + public static void main(String[] args) throws Exception { + asyncListLogicalProductVariantsPaged(); + } + + public static void asyncListLogicalProductVariantsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + ListLogicalProductVariantsRequest request = + ListLogicalProductVariantsRequest.newBuilder() + .setParent(LogicalProductName.of("[LOGICAL_PRODUCT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLogicalProductVariantsResponse response = + cloudProductRegistryReadServiceClient + .listLogicalProductVariantsCallable() + .call(request); + for (LogicalProductVariant element : response.getLogicalProductVariantsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProductVariants_Paged_async] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/SyncListLogicalProductVariants.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/SyncListLogicalProductVariants.java new file mode 100644 index 000000000000..317f9def4e39 --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/SyncListLogicalProductVariants.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProductVariants_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest; +import com.google.cloud.productregistry.v1.LogicalProductName; +import com.google.cloud.productregistry.v1.LogicalProductVariant; + +public class SyncListLogicalProductVariants { + + public static void main(String[] args) throws Exception { + syncListLogicalProductVariants(); + } + + public static void syncListLogicalProductVariants() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + ListLogicalProductVariantsRequest request = + ListLogicalProductVariantsRequest.newBuilder() + .setParent(LogicalProductName.of("[LOGICAL_PRODUCT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (LogicalProductVariant element : + cloudProductRegistryReadServiceClient.listLogicalProductVariants(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProductVariants_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/SyncListLogicalProductVariantsLogicalproductname.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/SyncListLogicalProductVariantsLogicalproductname.java new file mode 100644 index 000000000000..cbc931be263e --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/SyncListLogicalProductVariantsLogicalproductname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProductVariants_Logicalproductname_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.LogicalProductName; +import com.google.cloud.productregistry.v1.LogicalProductVariant; + +public class SyncListLogicalProductVariantsLogicalproductname { + + public static void main(String[] args) throws Exception { + syncListLogicalProductVariantsLogicalproductname(); + } + + public static void syncListLogicalProductVariantsLogicalproductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + LogicalProductName parent = LogicalProductName.of("[LOGICAL_PRODUCT]"); + for (LogicalProductVariant element : + cloudProductRegistryReadServiceClient.listLogicalProductVariants(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProductVariants_Logicalproductname_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/SyncListLogicalProductVariantsString.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/SyncListLogicalProductVariantsString.java new file mode 100644 index 000000000000..55b601518040 --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listlogicalproductvariants/SyncListLogicalProductVariantsString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProductVariants_String_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.LogicalProductName; +import com.google.cloud.productregistry.v1.LogicalProductVariant; + +public class SyncListLogicalProductVariantsString { + + public static void main(String[] args) throws Exception { + syncListLogicalProductVariantsString(); + } + + public static void syncListLogicalProductVariantsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + String parent = LogicalProductName.of("[LOGICAL_PRODUCT]").toString(); + for (LogicalProductVariant element : + cloudProductRegistryReadServiceClient.listLogicalProductVariants(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProductVariants_String_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listproductsuites/AsyncListProductSuites.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listproductsuites/AsyncListProductSuites.java new file mode 100644 index 000000000000..61f51e192691 --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listproductsuites/AsyncListProductSuites.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListProductSuites_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.ListProductSuitesRequest; +import com.google.cloud.productregistry.v1.ProductSuite; + +public class AsyncListProductSuites { + + public static void main(String[] args) throws Exception { + asyncListProductSuites(); + } + + public static void asyncListProductSuites() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + ListProductSuitesRequest request = + ListProductSuitesRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + cloudProductRegistryReadServiceClient + .listProductSuitesPagedCallable() + .futureCall(request); + // Do something. + for (ProductSuite element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListProductSuites_async] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listproductsuites/AsyncListProductSuitesPaged.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listproductsuites/AsyncListProductSuitesPaged.java new file mode 100644 index 000000000000..3d738e86fb2a --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listproductsuites/AsyncListProductSuitesPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListProductSuites_Paged_async] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.ListProductSuitesRequest; +import com.google.cloud.productregistry.v1.ListProductSuitesResponse; +import com.google.cloud.productregistry.v1.ProductSuite; +import com.google.common.base.Strings; + +public class AsyncListProductSuitesPaged { + + public static void main(String[] args) throws Exception { + asyncListProductSuitesPaged(); + } + + public static void asyncListProductSuitesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + ListProductSuitesRequest request = + ListProductSuitesRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListProductSuitesResponse response = + cloudProductRegistryReadServiceClient.listProductSuitesCallable().call(request); + for (ProductSuite element : response.getProductSuitesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListProductSuites_Paged_async] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listproductsuites/SyncListProductSuites.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listproductsuites/SyncListProductSuites.java new file mode 100644 index 000000000000..65706114b67b --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/listproductsuites/SyncListProductSuites.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListProductSuites_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.ListProductSuitesRequest; +import com.google.cloud.productregistry.v1.ProductSuite; + +public class SyncListProductSuites { + + public static void main(String[] args) throws Exception { + syncListProductSuites(); + } + + public static void syncListProductSuites() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + ListProductSuitesRequest request = + ListProductSuitesRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (ProductSuite element : + cloudProductRegistryReadServiceClient.listProductSuites(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListProductSuites_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/lookupentity/AsyncLookupEntity.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/lookupentity/AsyncLookupEntity.java new file mode 100644 index 000000000000..9971a4ad6e39 --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/lookupentity/AsyncLookupEntity.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_LookupEntity_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.LookupEntityRequest; +import com.google.cloud.productregistry.v1.LookupEntityResponse; + +public class AsyncLookupEntity { + + public static void main(String[] args) throws Exception { + asyncLookupEntity(); + } + + public static void asyncLookupEntity() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + LookupEntityRequest request = + LookupEntityRequest.newBuilder().setLookupUri("lookupUri1150318994").build(); + ApiFuture future = + cloudProductRegistryReadServiceClient.lookupEntityCallable().futureCall(request); + // Do something. + LookupEntityResponse response = future.get(); + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_LookupEntity_async] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/lookupentity/SyncLookupEntity.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/lookupentity/SyncLookupEntity.java new file mode 100644 index 000000000000..380185d0f8ea --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservice/lookupentity/SyncLookupEntity.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadService_LookupEntity_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceClient; +import com.google.cloud.productregistry.v1.LookupEntityRequest; +import com.google.cloud.productregistry.v1.LookupEntityResponse; + +public class SyncLookupEntity { + + public static void main(String[] args) throws Exception { + syncLookupEntity(); + } + + public static void syncLookupEntity() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudProductRegistryReadServiceClient cloudProductRegistryReadServiceClient = + CloudProductRegistryReadServiceClient.create()) { + LookupEntityRequest request = + LookupEntityRequest.newBuilder().setLookupUri("lookupUri1150318994").build(); + LookupEntityResponse response = cloudProductRegistryReadServiceClient.lookupEntity(request); + } + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_LookupEntity_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservicesettings/getproductsuite/SyncGetProductSuite.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservicesettings/getproductsuite/SyncGetProductSuite.java new file mode 100644 index 000000000000..aac47a5dec6c --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/cloudproductregistryreadservicesettings/getproductsuite/SyncGetProductSuite.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadServiceSettings_GetProductSuite_sync] +import com.google.cloud.productregistry.v1.CloudProductRegistryReadServiceSettings; +import java.time.Duration; + +public class SyncGetProductSuite { + + public static void main(String[] args) throws Exception { + syncGetProductSuite(); + } + + public static void syncGetProductSuite() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudProductRegistryReadServiceSettings.Builder cloudProductRegistryReadServiceSettingsBuilder = + CloudProductRegistryReadServiceSettings.newBuilder(); + cloudProductRegistryReadServiceSettingsBuilder + .getProductSuiteSettings() + .setRetrySettings( + cloudProductRegistryReadServiceSettingsBuilder + .getProductSuiteSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + CloudProductRegistryReadServiceSettings cloudProductRegistryReadServiceSettings = + cloudProductRegistryReadServiceSettingsBuilder.build(); + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadServiceSettings_GetProductSuite_sync] diff --git a/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/stub/cloudproductregistryreadservicestubsettings/getproductsuite/SyncGetProductSuite.java b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/stub/cloudproductregistryreadservicestubsettings/getproductsuite/SyncGetProductSuite.java new file mode 100644 index 000000000000..2c9fa35e14ad --- /dev/null +++ b/java-productregistry/samples/snippets/generated/com/google/cloud/productregistry/v1/stub/cloudproductregistryreadservicestubsettings/getproductsuite/SyncGetProductSuite.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.productregistry.v1.stub.samples; + +// [START cloudproductregistry_v1_generated_CloudProductRegistryReadServiceStubSettings_GetProductSuite_sync] +import com.google.cloud.productregistry.v1.stub.CloudProductRegistryReadServiceStubSettings; +import java.time.Duration; + +public class SyncGetProductSuite { + + public static void main(String[] args) throws Exception { + syncGetProductSuite(); + } + + public static void syncGetProductSuite() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + CloudProductRegistryReadServiceStubSettings.Builder + cloudProductRegistryReadServiceSettingsBuilder = + CloudProductRegistryReadServiceStubSettings.newBuilder(); + cloudProductRegistryReadServiceSettingsBuilder + .getProductSuiteSettings() + .setRetrySettings( + cloudProductRegistryReadServiceSettingsBuilder + .getProductSuiteSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + CloudProductRegistryReadServiceStubSettings cloudProductRegistryReadServiceSettings = + cloudProductRegistryReadServiceSettingsBuilder.build(); + } +} +// [END cloudproductregistry_v1_generated_CloudProductRegistryReadServiceStubSettings_GetProductSuite_sync] diff --git a/librarian.yaml b/librarian.yaml index 70bef0d3df22..b860ac555194 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -2816,6 +2816,10 @@ libraries: name_pretty_override: Privileged Access Manager API product_documentation_override: https://cloud.google.com/java/docs/reference/google-cloud-privilegedaccessmanager/latest/overview rpc_documentation: https://cloud.google.com/iam/docs/reference/pam/rpc + - name: productregistry + version: 0.1.0-SNAPSHOT + apis: + - path: google/cloud/productregistry/v1 - name: profiler version: 2.95.0-SNAPSHOT apis: diff --git a/pom.xml b/pom.xml index 7c4728b845ad..9d4ba551d199 100644 --- a/pom.xml +++ b/pom.xml @@ -198,6 +198,7 @@ java-policysimulator java-private-catalog java-privilegedaccessmanager + java-productregistry java-profiler java-publicca java-pubsub diff --git a/versions.txt b/versions.txt index 516260064930..4c39bdd93b56 100644 --- a/versions.txt +++ b/versions.txt @@ -1077,3 +1077,8 @@ grpc-google-cloud-agentidentity-v1:0.0.0:0.1.0-SNAPSHOT google-cloud-agentidentity:0.0.0:0.1.0-SNAPSHOT proto-google-cloud-agentidentity-v1beta:0.0.0:0.1.0-SNAPSHOT grpc-google-cloud-agentidentity-v1beta:0.0.0:0.1.0-SNAPSHOT +google-cloud-productregistry-parent:0.0.0:0.1.0-SNAPSHOT +google-cloud-productregistry-bom:0.0.0:0.1.0-SNAPSHOT +proto-google-cloud-productregistry-v1:0.0.0:0.1.0-SNAPSHOT +grpc-google-cloud-productregistry-v1:0.0.0:0.1.0-SNAPSHOT +google-cloud-productregistry:0.0.0:0.1.0-SNAPSHOT