From ac5e96a102c6fb3ab5f4b69dc88dba9c246168f5 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Fri, 11 Jul 2025 19:40:38 +0000 Subject: [PATCH 1/4] feat: [licensemanager] new module for licensemanager --- generation_config.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/generation_config.yaml b/generation_config.yaml index fa03daedfe7b..9834f3fa9288 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1301,6 +1301,22 @@ libraries: - proto_path: google/cloud/language/v1beta2 - proto_path: google/cloud/language/v2 +- api_shortname: licensemanager + name_pretty: License Manager API + product_documentation: https://cloud.google.com/compute/docs/instances/windows/ms-licensing + api_description: License Manager is a tool to manage and track third-party licenses + on Google Cloud. + client_documentation: + https://cloud.google.com/java/docs/reference/google-cloud-licensemanager/latest/overview + release_level: preview + distribution_name: com.google.cloud:google-cloud-licensemanager + api_id: licensemanager.googleapis.com + library_type: GAPIC_AUTO + group_id: com.google.cloud + cloud_api: true + GAPICs: + - proto_path: google/cloud/licensemanager/v1 + requires_billing: true - api_shortname: lifesciences name_pretty: Cloud Life Sciences product_documentation: https://cloud.google.com/life-sciences/docs From e31cb8e02b158fd7d67b59d1a12e8ac48874068a Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Fri, 11 Jul 2025 19:46:50 +0000 Subject: [PATCH 2/4] chore: generate libraries at Fri Jul 11 19:45:06 UTC 2025 --- gapic-libraries-bom/pom.xml | 7 + java-licensemanager/.OwlBot-hermetic.yaml | 35 + java-licensemanager/.repo-metadata.json | 16 + java-licensemanager/README.md | 224 ++ .../google-cloud-licensemanager-bom/pom.xml | 43 + .../google-cloud-licensemanager/pom.xml | 115 + .../v1/LicenseManagerClient.java | 2991 +++++++++++++++ .../v1/LicenseManagerSettings.java | 492 +++ .../licensemanager/v1/gapic_metadata.json | 63 + .../cloud/licensemanager/v1/package-info.java | 43 + .../GrpcLicenseManagerCallableFactory.java | 113 + .../v1/stub/GrpcLicenseManagerStub.java | 768 ++++ ...HttpJsonLicenseManagerCallableFactory.java | 101 + .../v1/stub/HttpJsonLicenseManagerStub.java | 1269 +++++++ .../v1/stub/LicenseManagerStub.java | 198 + .../v1/stub/LicenseManagerStubSettings.java | 1302 +++++++ .../reflect-config.json | 2027 +++++++++++ .../v1/LicenseManagerClientHttpJsonTest.java | 1544 ++++++++ .../v1/LicenseManagerClientTest.java | 1403 ++++++++ .../licensemanager/v1/MockLicenseManager.java | 59 + .../v1/MockLicenseManagerImpl.java | 337 ++ .../licensemanager/v1/MockLocations.java | 59 + .../licensemanager/v1/MockLocationsImpl.java | 105 + .../pom.xml | 45 + .../licensemanager/v1/LicenseManagerGrpc.java | 2023 +++++++++++ java-licensemanager/owlbot.py | 36 + java-licensemanager/pom.xml | 55 + .../clirr-ignored-differences.xml | 80 + .../pom.xml | 37 + .../licensemanager/v1/ActivationState.java | 273 ++ .../v1/AggregateUsageRequest.java | 1917 ++++++++++ .../v1/AggregateUsageRequestOrBuilder.java | 231 ++ .../v1/AggregateUsageResponse.java | 1439 ++++++++ .../v1/AggregateUsageResponseOrBuilder.java | 162 + .../licensemanager/v1/ApiEntitiesProto.java | 314 ++ .../cloud/licensemanager/v1/BillingInfo.java | 1455 ++++++++ .../v1/BillingInfoOrBuilder.java | 154 + .../licensemanager/v1/Configuration.java | 3126 ++++++++++++++++ .../licensemanager/v1/ConfigurationName.java | 227 ++ .../v1/ConfigurationOrBuilder.java | 397 ++ .../v1/CreateConfigurationRequest.java | 1447 ++++++++ .../CreateConfigurationRequestOrBuilder.java | 179 + .../v1/DeactivateConfigurationRequest.java | 946 +++++ ...activateConfigurationRequestOrBuilder.java | 110 + .../v1/DeleteConfigurationRequest.java | 940 +++++ .../DeleteConfigurationRequestOrBuilder.java | 110 + .../v1/GetConfigurationRequest.java | 649 ++++ .../v1/GetConfigurationRequestOrBuilder.java | 56 + .../licensemanager/v1/GetInstanceRequest.java | 649 ++++ .../v1/GetInstanceRequestOrBuilder.java | 56 + .../licensemanager/v1/GetProductRequest.java | 648 ++++ .../v1/GetProductRequestOrBuilder.java | 56 + .../cloud/licensemanager/v1/Instance.java | 3198 +++++++++++++++++ .../cloud/licensemanager/v1/InstanceName.java | 223 ++ .../licensemanager/v1/InstanceOrBuilder.java | 428 +++ .../v1/LicenseManagerProto.java | 486 +++ .../cloud/licensemanager/v1/LicenseType.java | 181 + .../v1/ListConfigurationsRequest.java | 1321 +++++++ .../ListConfigurationsRequestOrBuilder.java | 148 + .../v1/ListConfigurationsResponse.java | 1458 ++++++++ .../ListConfigurationsResponseOrBuilder.java | 162 + .../v1/ListInstancesRequest.java | 1317 +++++++ .../v1/ListInstancesRequestOrBuilder.java | 148 + .../v1/ListInstancesResponse.java | 1442 ++++++++ .../v1/ListInstancesResponseOrBuilder.java | 162 + .../v1/ListProductsRequest.java | 1317 +++++++ .../v1/ListProductsRequestOrBuilder.java | 148 + .../v1/ListProductsResponse.java | 1440 ++++++++ .../v1/ListProductsResponseOrBuilder.java | 162 + .../cloud/licensemanager/v1/LocationName.java | 192 + .../licensemanager/v1/OperationMetadata.java | 1910 ++++++++++ .../v1/OperationMetadataOrBuilder.java | 228 ++ .../cloud/licensemanager/v1/Product.java | 1961 ++++++++++ .../cloud/licensemanager/v1/ProductName.java | 223 ++ .../licensemanager/v1/ProductOrBuilder.java | 214 ++ ...QueryConfigurationLicenseUsageRequest.java | 1267 +++++++ ...igurationLicenseUsageRequestOrBuilder.java | 139 + ...ueryConfigurationLicenseUsageResponse.java | 854 +++++ ...gurationLicenseUsageResponseOrBuilder.java | 66 + .../v1/ReactivateConfigurationRequest.java | 946 +++++ ...activateConfigurationRequestOrBuilder.java | 110 + .../v1/UpdateConfigurationRequest.java | 1391 +++++++ .../UpdateConfigurationRequestOrBuilder.java | 175 + .../google/cloud/licensemanager/v1/Usage.java | 736 ++++ .../licensemanager/v1/UsageOrBuilder.java | 67 + .../v1/UserCountBillingInfo.java | 542 +++ .../v1/UserCountBillingInfoOrBuilder.java | 39 + .../licensemanager/v1/UserCountUsage.java | 543 +++ .../v1/UserCountUsageOrBuilder.java | 39 + .../licensemanager/v1/api_entities.proto | 295 ++ .../licensemanager/v1/licensemanager.proto | 586 +++ .../aggregateusage/AsyncAggregateUsage.java | 60 + .../AsyncAggregateUsagePaged.java | 68 + .../aggregateusage/SyncAggregateUsage.java | 56 + ...geConfigurationnameTimestampTimestamp.java | 48 + ...ggregateUsageStringTimestampTimestamp.java | 48 + .../SyncCreateSetCredentialsProvider.java | 44 + .../create/SyncCreateSetEndpoint.java | 41 + .../SyncCreateUseHttpJsonTransport.java | 40 + .../AsyncCreateConfiguration.java | 54 + .../AsyncCreateConfigurationLRO.java | 54 + .../SyncCreateConfiguration.java | 49 + ...rationLocationnameConfigurationString.java | 47 + ...onfigurationStringConfigurationString.java | 47 + .../AsyncDeactivateConfiguration.java | 52 + .../AsyncDeactivateConfigurationLRO.java | 53 + .../SyncDeactivateConfiguration.java | 48 + ...ctivateConfigurationConfigurationname.java | 42 + .../SyncDeactivateConfigurationString.java | 42 + .../AsyncDeleteConfiguration.java | 52 + .../AsyncDeleteConfigurationLRO.java | 53 + .../SyncDeleteConfiguration.java | 48 + ...cDeleteConfigurationConfigurationname.java | 42 + .../SyncDeleteConfigurationString.java | 42 + .../AsyncGetConfiguration.java | 51 + .../SyncGetConfiguration.java | 47 + ...SyncGetConfigurationConfigurationname.java | 42 + .../SyncGetConfigurationString.java | 42 + .../getinstance/AsyncGetInstance.java | 49 + .../getinstance/SyncGetInstance.java | 46 + .../SyncGetInstanceInstancename.java | 42 + .../getinstance/SyncGetInstanceString.java | 42 + .../getlocation/AsyncGetLocation.java | 45 + .../getlocation/SyncGetLocation.java | 42 + .../getproduct/AsyncGetProduct.java | 49 + .../getproduct/SyncGetProduct.java | 46 + .../getproduct/SyncGetProductProductname.java | 42 + .../getproduct/SyncGetProductString.java | 42 + .../AsyncListConfigurations.java | 56 + .../AsyncListConfigurationsPaged.java | 64 + .../SyncListConfigurations.java | 52 + .../SyncListConfigurationsLocationname.java | 44 + .../SyncListConfigurationsString.java | 44 + .../listinstances/AsyncListInstances.java | 56 + .../AsyncListInstancesPaged.java | 63 + .../listinstances/SyncListInstances.java | 52 + .../SyncListInstancesLocationname.java | 44 + .../SyncListInstancesString.java | 44 + .../listlocations/AsyncListLocations.java | 54 + .../AsyncListLocationsPaged.java | 61 + .../listlocations/SyncListLocations.java | 50 + .../listproducts/AsyncListProducts.java | 56 + .../listproducts/AsyncListProductsPaged.java | 63 + .../listproducts/SyncListProducts.java | 52 + .../SyncListProductsLocationname.java | 44 + .../listproducts/SyncListProductsString.java | 44 + .../AsyncQueryConfigurationLicenseUsage.java | 54 + .../SyncQueryConfigurationLicenseUsage.java | 51 + ...geConfigurationnameTimestampTimestamp.java | 47 + ...nLicenseUsageStringTimestampTimestamp.java | 46 + .../AsyncReactivateConfiguration.java | 52 + .../AsyncReactivateConfigurationLRO.java | 53 + .../SyncReactivateConfiguration.java | 48 + ...ctivateConfigurationConfigurationname.java | 42 + .../SyncReactivateConfigurationString.java | 42 + .../AsyncUpdateConfiguration.java | 53 + .../AsyncUpdateConfigurationLRO.java | 53 + .../SyncUpdateConfiguration.java | 48 + ...teConfigurationConfigurationFieldmask.java | 44 + .../SyncCreateConfiguration.java | 54 + .../SyncGetConfiguration.java | 56 + .../SyncCreateConfiguration.java | 54 + .../SyncGetConfiguration.java | 56 + pom.xml | 1 + versions.txt | 3 + 165 files changed, 60952 insertions(+) create mode 100644 java-licensemanager/.OwlBot-hermetic.yaml create mode 100644 java-licensemanager/.repo-metadata.json create mode 100644 java-licensemanager/README.md create mode 100644 java-licensemanager/google-cloud-licensemanager-bom/pom.xml create mode 100644 java-licensemanager/google-cloud-licensemanager/pom.xml create mode 100644 java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/LicenseManagerClient.java create mode 100644 java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/LicenseManagerSettings.java create mode 100644 java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/gapic_metadata.json create mode 100644 java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/package-info.java create mode 100644 java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/GrpcLicenseManagerCallableFactory.java create mode 100644 java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/GrpcLicenseManagerStub.java create mode 100644 java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/HttpJsonLicenseManagerCallableFactory.java create mode 100644 java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/HttpJsonLicenseManagerStub.java create mode 100644 java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/LicenseManagerStub.java create mode 100644 java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/LicenseManagerStubSettings.java create mode 100644 java-licensemanager/google-cloud-licensemanager/src/main/resources/META-INF/native-image/com.google.cloud.licensemanager.v1/reflect-config.json create mode 100644 java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/LicenseManagerClientHttpJsonTest.java create mode 100644 java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/LicenseManagerClientTest.java create mode 100644 java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/MockLicenseManager.java create mode 100644 java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/MockLicenseManagerImpl.java create mode 100644 java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/MockLocations.java create mode 100644 java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/MockLocationsImpl.java create mode 100644 java-licensemanager/grpc-google-cloud-licensemanager-v1/pom.xml create mode 100644 java-licensemanager/grpc-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/LicenseManagerGrpc.java create mode 100644 java-licensemanager/owlbot.py create mode 100644 java-licensemanager/pom.xml create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/clirr-ignored-differences.xml create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/pom.xml create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ActivationState.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/AggregateUsageRequest.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/AggregateUsageRequestOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/AggregateUsageResponse.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/AggregateUsageResponseOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ApiEntitiesProto.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/BillingInfo.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/BillingInfoOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/Configuration.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ConfigurationName.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ConfigurationOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/CreateConfigurationRequest.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/CreateConfigurationRequestOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/DeactivateConfigurationRequest.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/DeactivateConfigurationRequestOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/DeleteConfigurationRequest.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/DeleteConfigurationRequestOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetConfigurationRequest.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetConfigurationRequestOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetInstanceRequest.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetInstanceRequestOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetProductRequest.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetProductRequestOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/Instance.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/InstanceName.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/InstanceOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/LicenseManagerProto.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/LicenseType.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListConfigurationsRequest.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListConfigurationsRequestOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListConfigurationsResponse.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListConfigurationsResponseOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListInstancesRequest.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListInstancesRequestOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListInstancesResponse.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListInstancesResponseOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListProductsRequest.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListProductsRequestOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListProductsResponse.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListProductsResponseOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/LocationName.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/OperationMetadata.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/OperationMetadataOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/Product.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ProductName.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ProductOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/QueryConfigurationLicenseUsageRequest.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/QueryConfigurationLicenseUsageRequestOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/QueryConfigurationLicenseUsageResponse.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/QueryConfigurationLicenseUsageResponseOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ReactivateConfigurationRequest.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ReactivateConfigurationRequestOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UpdateConfigurationRequest.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UpdateConfigurationRequestOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/Usage.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UsageOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UserCountBillingInfo.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UserCountBillingInfoOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UserCountUsage.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UserCountUsageOrBuilder.java create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/proto/google/cloud/licensemanager/v1/api_entities.proto create mode 100644 java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/proto/google/cloud/licensemanager/v1/licensemanager.proto create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/AsyncAggregateUsage.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/AsyncAggregateUsagePaged.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/SyncAggregateUsage.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/SyncAggregateUsageConfigurationnameTimestampTimestamp.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/SyncAggregateUsageStringTimestampTimestamp.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/create/SyncCreateSetEndpoint.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/create/SyncCreateUseHttpJsonTransport.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/AsyncCreateConfiguration.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/AsyncCreateConfigurationLRO.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/SyncCreateConfiguration.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/SyncCreateConfigurationLocationnameConfigurationString.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/SyncCreateConfigurationStringConfigurationString.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/AsyncDeactivateConfiguration.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/AsyncDeactivateConfigurationLRO.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/SyncDeactivateConfiguration.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/SyncDeactivateConfigurationConfigurationname.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/SyncDeactivateConfigurationString.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/AsyncDeleteConfiguration.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/AsyncDeleteConfigurationLRO.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/SyncDeleteConfiguration.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/SyncDeleteConfigurationConfigurationname.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/SyncDeleteConfigurationString.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getconfiguration/AsyncGetConfiguration.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getconfiguration/SyncGetConfiguration.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getconfiguration/SyncGetConfigurationConfigurationname.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getconfiguration/SyncGetConfigurationString.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getinstance/AsyncGetInstance.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getinstance/SyncGetInstance.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getinstance/SyncGetInstanceInstancename.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getinstance/SyncGetInstanceString.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getlocation/AsyncGetLocation.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getlocation/SyncGetLocation.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getproduct/AsyncGetProduct.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getproduct/SyncGetProduct.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getproduct/SyncGetProductProductname.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getproduct/SyncGetProductString.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/AsyncListConfigurations.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/AsyncListConfigurationsPaged.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/SyncListConfigurations.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/SyncListConfigurationsLocationname.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/SyncListConfigurationsString.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/AsyncListInstances.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/AsyncListInstancesPaged.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/SyncListInstances.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/SyncListInstancesLocationname.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/SyncListInstancesString.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listlocations/AsyncListLocations.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listlocations/AsyncListLocationsPaged.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listlocations/SyncListLocations.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/AsyncListProducts.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/AsyncListProductsPaged.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/SyncListProducts.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/SyncListProductsLocationname.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/SyncListProductsString.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/queryconfigurationlicenseusage/AsyncQueryConfigurationLicenseUsage.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/queryconfigurationlicenseusage/SyncQueryConfigurationLicenseUsage.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/queryconfigurationlicenseusage/SyncQueryConfigurationLicenseUsageConfigurationnameTimestampTimestamp.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/queryconfigurationlicenseusage/SyncQueryConfigurationLicenseUsageStringTimestampTimestamp.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/AsyncReactivateConfiguration.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/AsyncReactivateConfigurationLRO.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/SyncReactivateConfiguration.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/SyncReactivateConfigurationConfigurationname.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/SyncReactivateConfigurationString.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/updateconfiguration/AsyncUpdateConfiguration.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/updateconfiguration/AsyncUpdateConfigurationLRO.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/updateconfiguration/SyncUpdateConfiguration.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/updateconfiguration/SyncUpdateConfigurationConfigurationFieldmask.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanagersettings/createconfiguration/SyncCreateConfiguration.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanagersettings/getconfiguration/SyncGetConfiguration.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/stub/licensemanagerstubsettings/createconfiguration/SyncCreateConfiguration.java create mode 100644 java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/stub/licensemanagerstubsettings/getconfiguration/SyncGetConfiguration.java diff --git a/gapic-libraries-bom/pom.xml b/gapic-libraries-bom/pom.xml index 1f8aef7588be..b3f0384705b0 100644 --- a/gapic-libraries-bom/pom.xml +++ b/gapic-libraries-bom/pom.xml @@ -719,6 +719,13 @@ pom import + + com.google.cloud + google-cloud-licensemanager-bom + 0.0.1-SNAPSHOT + pom + import + com.google.cloud google-cloud-life-sciences-bom diff --git a/java-licensemanager/.OwlBot-hermetic.yaml b/java-licensemanager/.OwlBot-hermetic.yaml new file mode 100644 index 000000000000..08c791e8342c --- /dev/null +++ b/java-licensemanager/.OwlBot-hermetic.yaml @@ -0,0 +1,35 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +deep-remove-regex: +- "/java-licensemanager/grpc-google-.*/src" +- "/java-licensemanager/proto-google-.*/src" +- "/java-licensemanager/google-.*/src" +- "/java-licensemanager/samples/snippets/generated" + +deep-preserve-regex: +- "/java-licensemanager/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/cloud/licensemanager/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/java-licensemanager/$1/proto-google-cloud-licensemanager-$1/src" +- source: "/google/cloud/licensemanager/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/java-licensemanager/$1/grpc-google-cloud-licensemanager-$1/src" +- source: "/google/cloud/licensemanager/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/java-licensemanager/$1/google-cloud-licensemanager/src" +- source: "/google/cloud/licensemanager/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/java-licensemanager/$1/samples/snippets/generated" + +api-name: licensemanager \ No newline at end of file diff --git a/java-licensemanager/.repo-metadata.json b/java-licensemanager/.repo-metadata.json new file mode 100644 index 000000000000..6e1b23766c79 --- /dev/null +++ b/java-licensemanager/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "api_shortname": "licensemanager", + "name_pretty": "License Manager API", + "product_documentation": "https://cloud.google.com/compute/docs/instances/windows/ms-licensing", + "api_description": "License Manager is a tool to manage and track third-party licenses on Google Cloud.", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-licensemanager/latest/overview", + "release_level": "preview", + "transport": "both", + "language": "java", + "repo": "googleapis/google-cloud-java", + "repo_short": "java-licensemanager", + "distribution_name": "com.google.cloud:google-cloud-licensemanager", + "api_id": "licensemanager.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/java-licensemanager/README.md b/java-licensemanager/README.md new file mode 100644 index 000000000000..d348f911aa78 --- /dev/null +++ b/java-licensemanager/README.md @@ -0,0 +1,224 @@ +# Google License Manager API Client for Java + +Java idiomatic client for [License Manager API][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.61.0 + pom + import + + + + + + + com.google.cloud + google-cloud-licensemanager + + +``` + +If you are using Maven without the BOM, add this to your dependencies: + + +```xml + + com.google.cloud + google-cloud-licensemanager + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies: + +```Groovy +implementation 'com.google.cloud:google-cloud-licensemanager:0.0.0' +``` + +If you are using SBT, add this to your dependencies: + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-licensemanager" % "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 License Manager API APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the License Manager API API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the License Manager API [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google License Manager API. +[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-licensemanager` library. See the [Quickstart](#quickstart) section +to add `google-cloud-licensemanager` as a dependency in your code. + +## About License Manager API + + +[License Manager API][product-docs] License Manager is a tool to manage and track third-party licenses on Google Cloud. + +See the [License Manager API client library docs][javadocs] to learn how to +use this License Manager API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +License Manager API 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. + +## CI Status + +Java Version | Status +------------ | ------ +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://cloud.google.com/compute/docs/instances/windows/ms-licensing +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-licensemanager/latest/overview +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html +[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-licensemanager.svg +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-licensemanager/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=licensemanager.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-licensemanager/google-cloud-licensemanager-bom/pom.xml b/java-licensemanager/google-cloud-licensemanager-bom/pom.xml new file mode 100644 index 000000000000..f311a8767895 --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager-bom/pom.xml @@ -0,0 +1,43 @@ + + + 4.0.0 + com.google.cloud + google-cloud-licensemanager-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-pom-parent + 1.62.0-SNAPSHOT + ../../google-cloud-pom-parent/pom.xml + + + Google License Manager API BOM + + BOM for License Manager API + + + + true + + + + + + com.google.cloud + google-cloud-licensemanager + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-licensemanager-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-licensemanager-v1 + 0.0.1-SNAPSHOT + + + + diff --git a/java-licensemanager/google-cloud-licensemanager/pom.xml b/java-licensemanager/google-cloud-licensemanager/pom.xml new file mode 100644 index 000000000000..a638c4623a2f --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/pom.xml @@ -0,0 +1,115 @@ + + + 4.0.0 + com.google.cloud + google-cloud-licensemanager + 0.0.1-SNAPSHOT + jar + Google License Manager API + License Manager API License Manager is a tool to manage and track third-party licenses on Google Cloud. + + com.google.cloud + google-cloud-licensemanager-parent + 0.0.1-SNAPSHOT + + + google-cloud-licensemanager + + + + 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-licensemanager-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-licensemanager-v1 + test + + + + com.google.api + gax + testlib + test + + + com.google.api + gax-grpc + testlib + test + + + com.google.api + gax-httpjson + testlib + test + + + diff --git a/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/LicenseManagerClient.java b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/LicenseManagerClient.java new file mode 100644 index 000000000000..3f9ddb18af62 --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/LicenseManagerClient.java @@ -0,0 +1,2991 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.licensemanager.v1.stub.LicenseManagerStub; +import com.google.cloud.licensemanager.v1.stub.LicenseManagerStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service describing handlers for resources + * + *

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

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

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

ListConfigurations

Lists Configurations in a given project and location.

+ *

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

+ *
    + *
  • listConfigurations(ListConfigurationsRequest request) + *

+ *

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

+ *
    + *
  • listConfigurations(LocationName parent) + *

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

+ *
    + *
  • listConfigurationsPagedCallable() + *

  • listConfigurationsCallable() + *

+ *

GetConfiguration

Gets details of a single Configuration.

+ *

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

+ *
    + *
  • getConfiguration(GetConfigurationRequest request) + *

+ *

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

+ *
    + *
  • getConfiguration(ConfigurationName name) + *

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

+ *
    + *
  • getConfigurationCallable() + *

+ *

CreateConfiguration

Creates a new Configuration in a given project and location.

+ *

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

+ *
    + *
  • createConfigurationAsync(CreateConfigurationRequest request) + *

+ *

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

+ *
    + *
  • createConfigurationAsync(LocationName parent, Configuration configuration, String configurationId) + *

  • createConfigurationAsync(String parent, Configuration configuration, String configurationId) + *

+ *

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

+ *
    + *
  • createConfigurationOperationCallable() + *

  • createConfigurationCallable() + *

+ *

UpdateConfiguration

Updates the parameters of a single Configuration.

+ *

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

+ *
    + *
  • updateConfigurationAsync(UpdateConfigurationRequest request) + *

+ *

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

+ *
    + *
  • updateConfigurationAsync(Configuration configuration, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateConfigurationOperationCallable() + *

  • updateConfigurationCallable() + *

+ *

DeleteConfiguration

Deletes a single Configuration.

+ *

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

+ *
    + *
  • deleteConfigurationAsync(DeleteConfigurationRequest request) + *

+ *

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

+ *
    + *
  • deleteConfigurationAsync(ConfigurationName name) + *

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

+ *
    + *
  • deleteConfigurationOperationCallable() + *

  • deleteConfigurationCallable() + *

+ *

ListInstances

Lists Instances in a given project and location.

+ *

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

+ *
    + *
  • listInstances(ListInstancesRequest request) + *

+ *

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

+ *
    + *
  • listInstances(LocationName parent) + *

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

+ *
    + *
  • listInstancesPagedCallable() + *

  • listInstancesCallable() + *

+ *

GetInstance

Gets details of a single Instance.

+ *

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

+ *
    + *
  • getInstance(GetInstanceRequest request) + *

+ *

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

+ *
    + *
  • getInstance(InstanceName name) + *

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

+ *
    + *
  • getInstanceCallable() + *

+ *

DeactivateConfiguration

Deactivates the given configuration.

+ *

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

+ *
    + *
  • deactivateConfigurationAsync(DeactivateConfigurationRequest request) + *

+ *

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

+ *
    + *
  • deactivateConfigurationAsync(ConfigurationName name) + *

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

+ *
    + *
  • deactivateConfigurationOperationCallable() + *

  • deactivateConfigurationCallable() + *

+ *

ReactivateConfiguration

Reactivates the given configuration.

+ *

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

+ *
    + *
  • reactivateConfigurationAsync(ReactivateConfigurationRequest request) + *

+ *

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

+ *
    + *
  • reactivateConfigurationAsync(ConfigurationName name) + *

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

+ *
    + *
  • reactivateConfigurationOperationCallable() + *

  • reactivateConfigurationCallable() + *

+ *

QueryConfigurationLicenseUsage

License Usage information for a Configuration.

+ *

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

+ *
    + *
  • queryConfigurationLicenseUsage(QueryConfigurationLicenseUsageRequest request) + *

+ *

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

+ *
    + *
  • queryConfigurationLicenseUsage(ConfigurationName name, Timestamp startTime, Timestamp endTime) + *

  • queryConfigurationLicenseUsage(String name, Timestamp startTime, Timestamp endTime) + *

+ *

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

+ *
    + *
  • queryConfigurationLicenseUsageCallable() + *

+ *

AggregateUsage

Aggregates Usage per Instance for a Configuration.

+ *

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

+ *
    + *
  • aggregateUsage(AggregateUsageRequest request) + *

+ *

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

+ *
    + *
  • aggregateUsage(ConfigurationName name, Timestamp startTime, Timestamp endTime) + *

  • aggregateUsage(String name, Timestamp startTime, Timestamp endTime) + *

+ *

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

+ *
    + *
  • aggregateUsagePagedCallable() + *

  • aggregateUsageCallable() + *

+ *

ListProducts

Lists Products in a given project and location.

+ *

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

+ *
    + *
  • listProducts(ListProductsRequest request) + *

+ *

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

+ *
    + *
  • listProducts(LocationName parent) + *

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

+ *
    + *
  • listProductsPagedCallable() + *

  • listProductsCallable() + *

+ *

GetProduct

Gets details of a single Product.

+ *

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

+ *
    + *
  • getProduct(GetProductRequest request) + *

+ *

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

+ *
    + *
  • getProduct(ProductName name) + *

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

+ *
    + *
  • getProductCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.

+ *

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

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

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

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

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

+ *
    + *
  • getLocationCallable() + *

+ *
+ * + *

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 LicenseManagerSettings 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
+ * LicenseManagerSettings licenseManagerSettings =
+ *     LicenseManagerSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * LicenseManagerClient licenseManagerClient = LicenseManagerClient.create(licenseManagerSettings);
+ * }
+ * + *

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
+ * LicenseManagerSettings licenseManagerSettings =
+ *     LicenseManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * LicenseManagerClient licenseManagerClient = LicenseManagerClient.create(licenseManagerSettings);
+ * }
+ * + *

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
+ * LicenseManagerSettings licenseManagerSettings =
+ *     LicenseManagerSettings.newHttpJsonBuilder().build();
+ * LicenseManagerClient licenseManagerClient = LicenseManagerClient.create(licenseManagerSettings);
+ * }
+ * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Configuration element : licenseManagerClient.listConfigurations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListConfigurationsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListConfigurationsPagedResponse listConfigurations(LocationName parent) { + ListConfigurationsRequest request = + ListConfigurationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listConfigurations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Configurations in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Configuration element : licenseManagerClient.listConfigurations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListConfigurationsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListConfigurationsPagedResponse listConfigurations(String parent) { + ListConfigurationsRequest request = + ListConfigurationsRequest.newBuilder().setParent(parent).build(); + return listConfigurations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Configurations in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ListConfigurationsRequest request =
+   *       ListConfigurationsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Configuration element : licenseManagerClient.listConfigurations(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 ListConfigurationsPagedResponse listConfigurations( + ListConfigurationsRequest request) { + return listConfigurationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Configurations in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ListConfigurationsRequest request =
+   *       ListConfigurationsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       licenseManagerClient.listConfigurationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Configuration element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listConfigurationsPagedCallable() { + return stub.listConfigurationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Configurations in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ListConfigurationsRequest request =
+   *       ListConfigurationsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListConfigurationsResponse response =
+   *         licenseManagerClient.listConfigurationsCallable().call(request);
+   *     for (Configuration element : response.getConfigurationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listConfigurationsCallable() { + return stub.listConfigurationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
+   *   Configuration response = licenseManagerClient.getConfiguration(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Configuration getConfiguration(ConfigurationName name) { + GetConfigurationRequest request = + GetConfigurationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getConfiguration(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
+   *   Configuration response = licenseManagerClient.getConfiguration(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Configuration getConfiguration(String name) { + GetConfigurationRequest request = GetConfigurationRequest.newBuilder().setName(name).build(); + return getConfiguration(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Configuration. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   GetConfigurationRequest request =
+   *       GetConfigurationRequest.newBuilder()
+   *           .setName(
+   *               ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       licenseManagerClient.getConfigurationCallable().futureCall(request);
+   *   // Do something.
+   *   Configuration response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getConfigurationCallable() { + return stub.getConfigurationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Configuration in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Configuration configuration = Configuration.newBuilder().build();
+   *   String configurationId = "configurationId1948915889";
+   *   Configuration response =
+   *       licenseManagerClient
+   *           .createConfigurationAsync(parent, configuration, configurationId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param configuration Required. The resource being created + * @param configurationId Required. Id of the requesting object + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createConfigurationAsync( + LocationName parent, Configuration configuration, String configurationId) { + CreateConfigurationRequest request = + CreateConfigurationRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setConfiguration(configuration) + .setConfigurationId(configurationId) + .build(); + return createConfigurationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Configuration in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Configuration configuration = Configuration.newBuilder().build();
+   *   String configurationId = "configurationId1948915889";
+   *   Configuration response =
+   *       licenseManagerClient
+   *           .createConfigurationAsync(parent, configuration, configurationId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param configuration Required. The resource being created + * @param configurationId Required. Id of the requesting object + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createConfigurationAsync( + String parent, Configuration configuration, String configurationId) { + CreateConfigurationRequest request = + CreateConfigurationRequest.newBuilder() + .setParent(parent) + .setConfiguration(configuration) + .setConfigurationId(configurationId) + .build(); + return createConfigurationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Configuration in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   CreateConfigurationRequest request =
+   *       CreateConfigurationRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setConfigurationId("configurationId1948915889")
+   *           .setConfiguration(Configuration.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Configuration response = licenseManagerClient.createConfigurationAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createConfigurationAsync( + CreateConfigurationRequest request) { + return createConfigurationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Configuration in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   CreateConfigurationRequest request =
+   *       CreateConfigurationRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setConfigurationId("configurationId1948915889")
+   *           .setConfiguration(Configuration.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       licenseManagerClient.createConfigurationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Configuration response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createConfigurationOperationCallable() { + return stub.createConfigurationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Configuration in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   CreateConfigurationRequest request =
+   *       CreateConfigurationRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setConfigurationId("configurationId1948915889")
+   *           .setConfiguration(Configuration.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       licenseManagerClient.createConfigurationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createConfigurationCallable() { + return stub.createConfigurationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   Configuration configuration = Configuration.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Configuration response =
+   *       licenseManagerClient.updateConfigurationAsync(configuration, updateMask).get();
+   * }
+   * }
+ * + * @param configuration Required. The resource being updated + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * Configuration resource by the update. The fields specified in the update_mask are relative + * to the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateConfigurationAsync( + Configuration configuration, FieldMask updateMask) { + UpdateConfigurationRequest request = + UpdateConfigurationRequest.newBuilder() + .setConfiguration(configuration) + .setUpdateMask(updateMask) + .build(); + return updateConfigurationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   UpdateConfigurationRequest request =
+   *       UpdateConfigurationRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setConfiguration(Configuration.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Configuration response = licenseManagerClient.updateConfigurationAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateConfigurationAsync( + UpdateConfigurationRequest request) { + return updateConfigurationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   UpdateConfigurationRequest request =
+   *       UpdateConfigurationRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setConfiguration(Configuration.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       licenseManagerClient.updateConfigurationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Configuration response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateConfigurationOperationCallable() { + return stub.updateConfigurationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   UpdateConfigurationRequest request =
+   *       UpdateConfigurationRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setConfiguration(Configuration.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       licenseManagerClient.updateConfigurationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateConfigurationCallable() { + return stub.updateConfigurationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
+   *   licenseManagerClient.deleteConfigurationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteConfigurationAsync( + ConfigurationName name) { + DeleteConfigurationRequest request = + DeleteConfigurationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteConfigurationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
+   *   licenseManagerClient.deleteConfigurationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteConfigurationAsync(String name) { + DeleteConfigurationRequest request = + DeleteConfigurationRequest.newBuilder().setName(name).build(); + return deleteConfigurationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   DeleteConfigurationRequest request =
+   *       DeleteConfigurationRequest.newBuilder()
+   *           .setName(
+   *               ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   licenseManagerClient.deleteConfigurationAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteConfigurationAsync( + DeleteConfigurationRequest request) { + return deleteConfigurationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   DeleteConfigurationRequest request =
+   *       DeleteConfigurationRequest.newBuilder()
+   *           .setName(
+   *               ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       licenseManagerClient.deleteConfigurationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteConfigurationOperationCallable() { + return stub.deleteConfigurationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   DeleteConfigurationRequest request =
+   *       DeleteConfigurationRequest.newBuilder()
+   *           .setName(
+   *               ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       licenseManagerClient.deleteConfigurationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteConfigurationCallable() { + return stub.deleteConfigurationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Instance element : licenseManagerClient.listInstances(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListInstancesRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancesPagedResponse listInstances(LocationName parent) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInstances(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Instance element : licenseManagerClient.listInstances(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListInstancesRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancesPagedResponse listInstances(String parent) { + ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(parent).build(); + return listInstances(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Instance element : licenseManagerClient.listInstances(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 ListInstancesPagedResponse listInstances(ListInstancesRequest request) { + return listInstancesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       licenseManagerClient.listInstancesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Instance element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInstancesPagedCallable() { + return stub.listInstancesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ListInstancesRequest request =
+   *       ListInstancesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListInstancesResponse response = licenseManagerClient.listInstancesCallable().call(request);
+   *     for (Instance element : response.getInstancesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listInstancesCallable() { + return stub.listInstancesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   Instance response = licenseManagerClient.getInstance(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance getInstance(InstanceName name) { + GetInstanceRequest request = + GetInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Instance. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+   *   Instance response = licenseManagerClient.getInstance(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance getInstance(String name) { + GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); + return getInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Instance. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   GetInstanceRequest request =
+   *       GetInstanceRequest.newBuilder()
+   *           .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .build();
+   *   ApiFuture future = licenseManagerClient.getInstanceCallable().futureCall(request);
+   *   // Do something.
+   *   Instance response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getInstanceCallable() { + return stub.getInstanceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deactivates the given configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
+   *   Configuration response = licenseManagerClient.deactivateConfigurationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deactivateConfigurationAsync( + ConfigurationName name) { + DeactivateConfigurationRequest request = + DeactivateConfigurationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deactivateConfigurationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deactivates the given configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
+   *   Configuration response = licenseManagerClient.deactivateConfigurationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deactivateConfigurationAsync( + String name) { + DeactivateConfigurationRequest request = + DeactivateConfigurationRequest.newBuilder().setName(name).build(); + return deactivateConfigurationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deactivates the given configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   DeactivateConfigurationRequest request =
+   *       DeactivateConfigurationRequest.newBuilder()
+   *           .setName(
+   *               ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Configuration response = licenseManagerClient.deactivateConfigurationAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deactivateConfigurationAsync( + DeactivateConfigurationRequest request) { + return deactivateConfigurationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deactivates the given configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   DeactivateConfigurationRequest request =
+   *       DeactivateConfigurationRequest.newBuilder()
+   *           .setName(
+   *               ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       licenseManagerClient.deactivateConfigurationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Configuration response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deactivateConfigurationOperationCallable() { + return stub.deactivateConfigurationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deactivates the given configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   DeactivateConfigurationRequest request =
+   *       DeactivateConfigurationRequest.newBuilder()
+   *           .setName(
+   *               ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       licenseManagerClient.deactivateConfigurationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deactivateConfigurationCallable() { + return stub.deactivateConfigurationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reactivates the given configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
+   *   Configuration response = licenseManagerClient.reactivateConfigurationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture reactivateConfigurationAsync( + ConfigurationName name) { + ReactivateConfigurationRequest request = + ReactivateConfigurationRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return reactivateConfigurationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reactivates the given configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
+   *   Configuration response = licenseManagerClient.reactivateConfigurationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture reactivateConfigurationAsync( + String name) { + ReactivateConfigurationRequest request = + ReactivateConfigurationRequest.newBuilder().setName(name).build(); + return reactivateConfigurationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reactivates the given configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ReactivateConfigurationRequest request =
+   *       ReactivateConfigurationRequest.newBuilder()
+   *           .setName(
+   *               ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Configuration response = licenseManagerClient.reactivateConfigurationAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture reactivateConfigurationAsync( + ReactivateConfigurationRequest request) { + return reactivateConfigurationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reactivates the given configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ReactivateConfigurationRequest request =
+   *       ReactivateConfigurationRequest.newBuilder()
+   *           .setName(
+   *               ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       licenseManagerClient.reactivateConfigurationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Configuration response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + reactivateConfigurationOperationCallable() { + return stub.reactivateConfigurationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Reactivates the given configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ReactivateConfigurationRequest request =
+   *       ReactivateConfigurationRequest.newBuilder()
+   *           .setName(
+   *               ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       licenseManagerClient.reactivateConfigurationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + reactivateConfigurationCallable() { + return stub.reactivateConfigurationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * License Usage information for a Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
+   *   Timestamp startTime = Timestamp.newBuilder().build();
+   *   Timestamp endTime = Timestamp.newBuilder().build();
+   *   QueryConfigurationLicenseUsageResponse response =
+   *       licenseManagerClient.queryConfigurationLicenseUsage(name, startTime, endTime);
+   * }
+   * }
+ * + * @param name Required. The resource path of the Configuration. + * @param startTime Required. The start time for retrieving the usage. If not specified, we will + * use the first day of the current billing period. + * @param endTime Required. The end time for retrieving the usage. If not specified, we will use + * the last day of the current billing period. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final QueryConfigurationLicenseUsageResponse queryConfigurationLicenseUsage( + ConfigurationName name, Timestamp startTime, Timestamp endTime) { + QueryConfigurationLicenseUsageRequest request = + QueryConfigurationLicenseUsageRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setStartTime(startTime) + .setEndTime(endTime) + .build(); + return queryConfigurationLicenseUsage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * License Usage information for a Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
+   *   Timestamp startTime = Timestamp.newBuilder().build();
+   *   Timestamp endTime = Timestamp.newBuilder().build();
+   *   QueryConfigurationLicenseUsageResponse response =
+   *       licenseManagerClient.queryConfigurationLicenseUsage(name, startTime, endTime);
+   * }
+   * }
+ * + * @param name Required. The resource path of the Configuration. + * @param startTime Required. The start time for retrieving the usage. If not specified, we will + * use the first day of the current billing period. + * @param endTime Required. The end time for retrieving the usage. If not specified, we will use + * the last day of the current billing period. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final QueryConfigurationLicenseUsageResponse queryConfigurationLicenseUsage( + String name, Timestamp startTime, Timestamp endTime) { + QueryConfigurationLicenseUsageRequest request = + QueryConfigurationLicenseUsageRequest.newBuilder() + .setName(name) + .setStartTime(startTime) + .setEndTime(endTime) + .build(); + return queryConfigurationLicenseUsage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * License Usage information for a Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   QueryConfigurationLicenseUsageRequest request =
+   *       QueryConfigurationLicenseUsageRequest.newBuilder()
+   *           .setName(
+   *               ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+   *           .setStartTime(Timestamp.newBuilder().build())
+   *           .setEndTime(Timestamp.newBuilder().build())
+   *           .build();
+   *   QueryConfigurationLicenseUsageResponse response =
+   *       licenseManagerClient.queryConfigurationLicenseUsage(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 QueryConfigurationLicenseUsageResponse queryConfigurationLicenseUsage( + QueryConfigurationLicenseUsageRequest request) { + return queryConfigurationLicenseUsageCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * License Usage information for a Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   QueryConfigurationLicenseUsageRequest request =
+   *       QueryConfigurationLicenseUsageRequest.newBuilder()
+   *           .setName(
+   *               ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+   *           .setStartTime(Timestamp.newBuilder().build())
+   *           .setEndTime(Timestamp.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       licenseManagerClient.queryConfigurationLicenseUsageCallable().futureCall(request);
+   *   // Do something.
+   *   QueryConfigurationLicenseUsageResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + QueryConfigurationLicenseUsageRequest, QueryConfigurationLicenseUsageResponse> + queryConfigurationLicenseUsageCallable() { + return stub.queryConfigurationLicenseUsageCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Aggregates Usage per Instance for a Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
+   *   Timestamp startTime = Timestamp.newBuilder().build();
+   *   Timestamp endTime = Timestamp.newBuilder().build();
+   *   for (Usage element :
+   *       licenseManagerClient.aggregateUsage(name, startTime, endTime).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. Parent value for AggregateUsageRequest + * @param startTime Required. Licenses are purchased per month - so usage track needs start time + * of a month. + * @param endTime Required. Usage track is always for a month. This parameter is for the end time + * of the month. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AggregateUsagePagedResponse aggregateUsage( + ConfigurationName name, Timestamp startTime, Timestamp endTime) { + AggregateUsageRequest request = + AggregateUsageRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setStartTime(startTime) + .setEndTime(endTime) + .build(); + return aggregateUsage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Aggregates Usage per Instance for a Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
+   *   Timestamp startTime = Timestamp.newBuilder().build();
+   *   Timestamp endTime = Timestamp.newBuilder().build();
+   *   for (Usage element :
+   *       licenseManagerClient.aggregateUsage(name, startTime, endTime).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. Parent value for AggregateUsageRequest + * @param startTime Required. Licenses are purchased per month - so usage track needs start time + * of a month. + * @param endTime Required. Usage track is always for a month. This parameter is for the end time + * of the month. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AggregateUsagePagedResponse aggregateUsage( + String name, Timestamp startTime, Timestamp endTime) { + AggregateUsageRequest request = + AggregateUsageRequest.newBuilder() + .setName(name) + .setStartTime(startTime) + .setEndTime(endTime) + .build(); + return aggregateUsage(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Aggregates Usage per Instance for a Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   AggregateUsageRequest request =
+   *       AggregateUsageRequest.newBuilder()
+   *           .setName(
+   *               ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setStartTime(Timestamp.newBuilder().build())
+   *           .setEndTime(Timestamp.newBuilder().build())
+   *           .build();
+   *   for (Usage element : licenseManagerClient.aggregateUsage(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 AggregateUsagePagedResponse aggregateUsage(AggregateUsageRequest request) { + return aggregateUsagePagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Aggregates Usage per Instance for a Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   AggregateUsageRequest request =
+   *       AggregateUsageRequest.newBuilder()
+   *           .setName(
+   *               ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setStartTime(Timestamp.newBuilder().build())
+   *           .setEndTime(Timestamp.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       licenseManagerClient.aggregateUsagePagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Usage element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + aggregateUsagePagedCallable() { + return stub.aggregateUsagePagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Aggregates Usage per Instance for a Configuration. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   AggregateUsageRequest request =
+   *       AggregateUsageRequest.newBuilder()
+   *           .setName(
+   *               ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setStartTime(Timestamp.newBuilder().build())
+   *           .setEndTime(Timestamp.newBuilder().build())
+   *           .build();
+   *   while (true) {
+   *     AggregateUsageResponse response =
+   *         licenseManagerClient.aggregateUsageCallable().call(request);
+   *     for (Usage element : response.getUsagesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + aggregateUsageCallable() { + return stub.aggregateUsageCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Products in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Product element : licenseManagerClient.listProducts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListProductsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsPagedResponse listProducts(LocationName parent) { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listProducts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Products in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Product element : licenseManagerClient.listProducts(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListProductsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListProductsPagedResponse listProducts(String parent) { + ListProductsRequest request = ListProductsRequest.newBuilder().setParent(parent).build(); + return listProducts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Products in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ListProductsRequest request =
+   *       ListProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Product element : licenseManagerClient.listProducts(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 ListProductsPagedResponse listProducts(ListProductsRequest request) { + return listProductsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Products in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ListProductsRequest request =
+   *       ListProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       licenseManagerClient.listProductsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Product element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listProductsPagedCallable() { + return stub.listProductsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Products in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ListProductsRequest request =
+   *       ListProductsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListProductsResponse response = licenseManagerClient.listProductsCallable().call(request);
+   *     for (Product element : response.getProductsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listProductsCallable() { + return stub.listProductsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Product. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+   *   Product response = licenseManagerClient.getProduct(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product getProduct(ProductName name) { + GetProductRequest request = + GetProductRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Product. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+   *   Product response = licenseManagerClient.getProduct(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Product getProduct(String name) { + GetProductRequest request = GetProductRequest.newBuilder().setName(name).build(); + return getProduct(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Product. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   GetProductRequest request =
+   *       GetProductRequest.newBuilder()
+   *           .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+   *           .build();
+   *   ApiFuture future = licenseManagerClient.getProductCallable().futureCall(request);
+   *   // Do something.
+   *   Product response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getProductCallable() { + return stub.getProductCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = licenseManagerClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = licenseManagerClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @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 ListConfigurationsPagedResponse + extends AbstractPagedListResponse< + ListConfigurationsRequest, + ListConfigurationsResponse, + Configuration, + ListConfigurationsPage, + ListConfigurationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListConfigurationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListConfigurationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListConfigurationsPagedResponse(ListConfigurationsPage page) { + super(page, ListConfigurationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListConfigurationsPage + extends AbstractPage< + ListConfigurationsRequest, + ListConfigurationsResponse, + Configuration, + ListConfigurationsPage> { + + private ListConfigurationsPage( + PageContext context, + ListConfigurationsResponse response) { + super(context, response); + } + + private static ListConfigurationsPage createEmptyPage() { + return new ListConfigurationsPage(null, null); + } + + @Override + protected ListConfigurationsPage createPage( + PageContext context, + ListConfigurationsResponse response) { + return new ListConfigurationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListConfigurationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListConfigurationsRequest, + ListConfigurationsResponse, + Configuration, + ListConfigurationsPage, + ListConfigurationsFixedSizeCollection> { + + private ListConfigurationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListConfigurationsFixedSizeCollection createEmptyCollection() { + return new ListConfigurationsFixedSizeCollection(null, 0); + } + + @Override + protected ListConfigurationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListConfigurationsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListInstancesPagedResponse + extends AbstractPagedListResponse< + ListInstancesRequest, + ListInstancesResponse, + Instance, + ListInstancesPage, + ListInstancesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListInstancesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListInstancesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListInstancesPagedResponse(ListInstancesPage page) { + super(page, ListInstancesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListInstancesPage + extends AbstractPage< + ListInstancesRequest, ListInstancesResponse, Instance, ListInstancesPage> { + + private ListInstancesPage( + PageContext context, + ListInstancesResponse response) { + super(context, response); + } + + private static ListInstancesPage createEmptyPage() { + return new ListInstancesPage(null, null); + } + + @Override + protected ListInstancesPage createPage( + PageContext context, + ListInstancesResponse response) { + return new ListInstancesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListInstancesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListInstancesRequest, + ListInstancesResponse, + Instance, + ListInstancesPage, + ListInstancesFixedSizeCollection> { + + private ListInstancesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListInstancesFixedSizeCollection createEmptyCollection() { + return new ListInstancesFixedSizeCollection(null, 0); + } + + @Override + protected ListInstancesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListInstancesFixedSizeCollection(pages, collectionSize); + } + } + + public static class AggregateUsagePagedResponse + extends AbstractPagedListResponse< + AggregateUsageRequest, + AggregateUsageResponse, + Usage, + AggregateUsagePage, + AggregateUsageFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + AggregateUsagePage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new AggregateUsagePagedResponse(input), + MoreExecutors.directExecutor()); + } + + private AggregateUsagePagedResponse(AggregateUsagePage page) { + super(page, AggregateUsageFixedSizeCollection.createEmptyCollection()); + } + } + + public static class AggregateUsagePage + extends AbstractPage< + AggregateUsageRequest, AggregateUsageResponse, Usage, AggregateUsagePage> { + + private AggregateUsagePage( + PageContext context, + AggregateUsageResponse response) { + super(context, response); + } + + private static AggregateUsagePage createEmptyPage() { + return new AggregateUsagePage(null, null); + } + + @Override + protected AggregateUsagePage createPage( + PageContext context, + AggregateUsageResponse response) { + return new AggregateUsagePage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class AggregateUsageFixedSizeCollection + extends AbstractFixedSizeCollection< + AggregateUsageRequest, + AggregateUsageResponse, + Usage, + AggregateUsagePage, + AggregateUsageFixedSizeCollection> { + + private AggregateUsageFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static AggregateUsageFixedSizeCollection createEmptyCollection() { + return new AggregateUsageFixedSizeCollection(null, 0); + } + + @Override + protected AggregateUsageFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new AggregateUsageFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListProductsPagedResponse + extends AbstractPagedListResponse< + ListProductsRequest, + ListProductsResponse, + Product, + ListProductsPage, + ListProductsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProductsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListProductsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListProductsPagedResponse(ListProductsPage page) { + super(page, ListProductsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProductsPage + extends AbstractPage { + + private ListProductsPage( + PageContext context, + ListProductsResponse response) { + super(context, response); + } + + private static ListProductsPage createEmptyPage() { + return new ListProductsPage(null, null); + } + + @Override + protected ListProductsPage createPage( + PageContext context, + ListProductsResponse response) { + return new ListProductsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProductsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProductsRequest, + ListProductsResponse, + Product, + ListProductsPage, + ListProductsFixedSizeCollection> { + + private ListProductsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProductsFixedSizeCollection createEmptyCollection() { + return new ListProductsFixedSizeCollection(null, 0); + } + + @Override + protected ListProductsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListProductsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/LicenseManagerSettings.java b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/LicenseManagerSettings.java new file mode 100644 index 000000000000..fa80a06849ba --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/LicenseManagerSettings.java @@ -0,0 +1,492 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1; + +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.AggregateUsagePagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListConfigurationsPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListInstancesPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListLocationsPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListProductsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.licensemanager.v1.stub.LicenseManagerStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link LicenseManagerClient}. + * + *

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

    + *
  • The default service address (licensemanager.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 getConfiguration: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * LicenseManagerSettings.Builder licenseManagerSettingsBuilder =
+ *     LicenseManagerSettings.newBuilder();
+ * licenseManagerSettingsBuilder
+ *     .getConfigurationSettings()
+ *     .setRetrySettings(
+ *         licenseManagerSettingsBuilder
+ *             .getConfigurationSettings()
+ *             .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());
+ * LicenseManagerSettings licenseManagerSettings = licenseManagerSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for + * additional support in setting retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createConfiguration: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * LicenseManagerSettings.Builder licenseManagerSettingsBuilder =
+ *     LicenseManagerSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * licenseManagerSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class LicenseManagerSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listConfigurations. */ + public PagedCallSettings< + ListConfigurationsRequest, ListConfigurationsResponse, ListConfigurationsPagedResponse> + listConfigurationsSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).listConfigurationsSettings(); + } + + /** Returns the object with the settings used for calls to getConfiguration. */ + public UnaryCallSettings getConfigurationSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).getConfigurationSettings(); + } + + /** Returns the object with the settings used for calls to createConfiguration. */ + public UnaryCallSettings createConfigurationSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).createConfigurationSettings(); + } + + /** Returns the object with the settings used for calls to createConfiguration. */ + public OperationCallSettings + createConfigurationOperationSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).createConfigurationOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateConfiguration. */ + public UnaryCallSettings updateConfigurationSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).updateConfigurationSettings(); + } + + /** Returns the object with the settings used for calls to updateConfiguration. */ + public OperationCallSettings + updateConfigurationOperationSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).updateConfigurationOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteConfiguration. */ + public UnaryCallSettings deleteConfigurationSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).deleteConfigurationSettings(); + } + + /** Returns the object with the settings used for calls to deleteConfiguration. */ + public OperationCallSettings + deleteConfigurationOperationSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).deleteConfigurationOperationSettings(); + } + + /** Returns the object with the settings used for calls to listInstances. */ + public PagedCallSettings + listInstancesSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).listInstancesSettings(); + } + + /** Returns the object with the settings used for calls to getInstance. */ + public UnaryCallSettings getInstanceSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).getInstanceSettings(); + } + + /** Returns the object with the settings used for calls to deactivateConfiguration. */ + public UnaryCallSettings + deactivateConfigurationSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).deactivateConfigurationSettings(); + } + + /** Returns the object with the settings used for calls to deactivateConfiguration. */ + public OperationCallSettings + deactivateConfigurationOperationSettings() { + return ((LicenseManagerStubSettings) getStubSettings()) + .deactivateConfigurationOperationSettings(); + } + + /** Returns the object with the settings used for calls to reactivateConfiguration. */ + public UnaryCallSettings + reactivateConfigurationSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).reactivateConfigurationSettings(); + } + + /** Returns the object with the settings used for calls to reactivateConfiguration. */ + public OperationCallSettings + reactivateConfigurationOperationSettings() { + return ((LicenseManagerStubSettings) getStubSettings()) + .reactivateConfigurationOperationSettings(); + } + + /** Returns the object with the settings used for calls to queryConfigurationLicenseUsage. */ + public UnaryCallSettings< + QueryConfigurationLicenseUsageRequest, QueryConfigurationLicenseUsageResponse> + queryConfigurationLicenseUsageSettings() { + return ((LicenseManagerStubSettings) getStubSettings()) + .queryConfigurationLicenseUsageSettings(); + } + + /** Returns the object with the settings used for calls to aggregateUsage. */ + public PagedCallSettings< + AggregateUsageRequest, AggregateUsageResponse, AggregateUsagePagedResponse> + aggregateUsageSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).aggregateUsageSettings(); + } + + /** Returns the object with the settings used for calls to listProducts. */ + public PagedCallSettings + listProductsSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).listProductsSettings(); + } + + /** Returns the object with the settings used for calls to getProduct. */ + public UnaryCallSettings getProductSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).getProductSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((LicenseManagerStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final LicenseManagerSettings create(LicenseManagerStubSettings stub) + throws IOException { + return new LicenseManagerSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return LicenseManagerStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return LicenseManagerStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return LicenseManagerStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return LicenseManagerStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return LicenseManagerStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return LicenseManagerStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return LicenseManagerStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return LicenseManagerStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected LicenseManagerSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for LicenseManagerSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(LicenseManagerStubSettings.newBuilder(clientContext)); + } + + protected Builder(LicenseManagerSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(LicenseManagerStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(LicenseManagerStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(LicenseManagerStubSettings.newHttpJsonBuilder()); + } + + public LicenseManagerStubSettings.Builder getStubSettingsBuilder() { + return ((LicenseManagerStubSettings.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 listConfigurations. */ + public PagedCallSettings.Builder< + ListConfigurationsRequest, ListConfigurationsResponse, ListConfigurationsPagedResponse> + listConfigurationsSettings() { + return getStubSettingsBuilder().listConfigurationsSettings(); + } + + /** Returns the builder for the settings used for calls to getConfiguration. */ + public UnaryCallSettings.Builder + getConfigurationSettings() { + return getStubSettingsBuilder().getConfigurationSettings(); + } + + /** Returns the builder for the settings used for calls to createConfiguration. */ + public UnaryCallSettings.Builder + createConfigurationSettings() { + return getStubSettingsBuilder().createConfigurationSettings(); + } + + /** Returns the builder for the settings used for calls to createConfiguration. */ + public OperationCallSettings.Builder< + CreateConfigurationRequest, Configuration, OperationMetadata> + createConfigurationOperationSettings() { + return getStubSettingsBuilder().createConfigurationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateConfiguration. */ + public UnaryCallSettings.Builder + updateConfigurationSettings() { + return getStubSettingsBuilder().updateConfigurationSettings(); + } + + /** Returns the builder for the settings used for calls to updateConfiguration. */ + public OperationCallSettings.Builder< + UpdateConfigurationRequest, Configuration, OperationMetadata> + updateConfigurationOperationSettings() { + return getStubSettingsBuilder().updateConfigurationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteConfiguration. */ + public UnaryCallSettings.Builder + deleteConfigurationSettings() { + return getStubSettingsBuilder().deleteConfigurationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteConfiguration. */ + public OperationCallSettings.Builder + deleteConfigurationOperationSettings() { + return getStubSettingsBuilder().deleteConfigurationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listInstances. */ + public PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings() { + return getStubSettingsBuilder().listInstancesSettings(); + } + + /** Returns the builder for the settings used for calls to getInstance. */ + public UnaryCallSettings.Builder getInstanceSettings() { + return getStubSettingsBuilder().getInstanceSettings(); + } + + /** Returns the builder for the settings used for calls to deactivateConfiguration. */ + public UnaryCallSettings.Builder + deactivateConfigurationSettings() { + return getStubSettingsBuilder().deactivateConfigurationSettings(); + } + + /** Returns the builder for the settings used for calls to deactivateConfiguration. */ + public OperationCallSettings.Builder< + DeactivateConfigurationRequest, Configuration, OperationMetadata> + deactivateConfigurationOperationSettings() { + return getStubSettingsBuilder().deactivateConfigurationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to reactivateConfiguration. */ + public UnaryCallSettings.Builder + reactivateConfigurationSettings() { + return getStubSettingsBuilder().reactivateConfigurationSettings(); + } + + /** Returns the builder for the settings used for calls to reactivateConfiguration. */ + public OperationCallSettings.Builder< + ReactivateConfigurationRequest, Configuration, OperationMetadata> + reactivateConfigurationOperationSettings() { + return getStubSettingsBuilder().reactivateConfigurationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to queryConfigurationLicenseUsage. */ + public UnaryCallSettings.Builder< + QueryConfigurationLicenseUsageRequest, QueryConfigurationLicenseUsageResponse> + queryConfigurationLicenseUsageSettings() { + return getStubSettingsBuilder().queryConfigurationLicenseUsageSettings(); + } + + /** Returns the builder for the settings used for calls to aggregateUsage. */ + public PagedCallSettings.Builder< + AggregateUsageRequest, AggregateUsageResponse, AggregateUsagePagedResponse> + aggregateUsageSettings() { + return getStubSettingsBuilder().aggregateUsageSettings(); + } + + /** Returns the builder for the settings used for calls to listProducts. */ + public PagedCallSettings.Builder< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings() { + return getStubSettingsBuilder().listProductsSettings(); + } + + /** Returns the builder for the settings used for calls to getProduct. */ + public UnaryCallSettings.Builder getProductSettings() { + return getStubSettingsBuilder().getProductSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public LicenseManagerSettings build() throws IOException { + return new LicenseManagerSettings(this); + } + } +} diff --git a/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/gapic_metadata.json b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/gapic_metadata.json new file mode 100644 index 000000000000..29b780ba9420 --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.licensemanager.v1", + "libraryPackage": "com.google.cloud.licensemanager.v1", + "services": { + "LicenseManager": { + "clients": { + "grpc": { + "libraryClient": "LicenseManagerClient", + "rpcs": { + "AggregateUsage": { + "methods": ["aggregateUsage", "aggregateUsage", "aggregateUsage", "aggregateUsagePagedCallable", "aggregateUsageCallable"] + }, + "CreateConfiguration": { + "methods": ["createConfigurationAsync", "createConfigurationAsync", "createConfigurationAsync", "createConfigurationOperationCallable", "createConfigurationCallable"] + }, + "DeactivateConfiguration": { + "methods": ["deactivateConfigurationAsync", "deactivateConfigurationAsync", "deactivateConfigurationAsync", "deactivateConfigurationOperationCallable", "deactivateConfigurationCallable"] + }, + "DeleteConfiguration": { + "methods": ["deleteConfigurationAsync", "deleteConfigurationAsync", "deleteConfigurationAsync", "deleteConfigurationOperationCallable", "deleteConfigurationCallable"] + }, + "GetConfiguration": { + "methods": ["getConfiguration", "getConfiguration", "getConfiguration", "getConfigurationCallable"] + }, + "GetInstance": { + "methods": ["getInstance", "getInstance", "getInstance", "getInstanceCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetProduct": { + "methods": ["getProduct", "getProduct", "getProduct", "getProductCallable"] + }, + "ListConfigurations": { + "methods": ["listConfigurations", "listConfigurations", "listConfigurations", "listConfigurationsPagedCallable", "listConfigurationsCallable"] + }, + "ListInstances": { + "methods": ["listInstances", "listInstances", "listInstances", "listInstancesPagedCallable", "listInstancesCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListProducts": { + "methods": ["listProducts", "listProducts", "listProducts", "listProductsPagedCallable", "listProductsCallable"] + }, + "QueryConfigurationLicenseUsage": { + "methods": ["queryConfigurationLicenseUsage", "queryConfigurationLicenseUsage", "queryConfigurationLicenseUsage", "queryConfigurationLicenseUsageCallable"] + }, + "ReactivateConfiguration": { + "methods": ["reactivateConfigurationAsync", "reactivateConfigurationAsync", "reactivateConfigurationAsync", "reactivateConfigurationOperationCallable", "reactivateConfigurationCallable"] + }, + "UpdateConfiguration": { + "methods": ["updateConfigurationAsync", "updateConfigurationAsync", "updateConfigurationOperationCallable", "updateConfigurationCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/package-info.java b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/package-info.java new file mode 100644 index 000000000000..4b01eb28c665 --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/package-info.java @@ -0,0 +1,43 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 License Manager API + * + *

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

======================= LicenseManagerClient ======================= + * + *

Service Description: Service describing handlers for resources + * + *

Sample for LicenseManagerClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ *   ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
+ *   Configuration response = licenseManagerClient.getConfiguration(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.licensemanager.v1; + +import javax.annotation.Generated; diff --git a/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/GrpcLicenseManagerCallableFactory.java b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/GrpcLicenseManagerCallableFactory.java new file mode 100644 index 000000000000..282a9dcbb83f --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/GrpcLicenseManagerCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the LicenseManager service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcLicenseManagerCallableFactory 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-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/GrpcLicenseManagerStub.java b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/GrpcLicenseManagerStub.java new file mode 100644 index 000000000000..a4b8ce669344 --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/GrpcLicenseManagerStub.java @@ -0,0 +1,768 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.stub; + +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.AggregateUsagePagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListConfigurationsPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListInstancesPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListLocationsPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListProductsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.licensemanager.v1.AggregateUsageRequest; +import com.google.cloud.licensemanager.v1.AggregateUsageResponse; +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.CreateConfigurationRequest; +import com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest; +import com.google.cloud.licensemanager.v1.DeleteConfigurationRequest; +import com.google.cloud.licensemanager.v1.GetConfigurationRequest; +import com.google.cloud.licensemanager.v1.GetInstanceRequest; +import com.google.cloud.licensemanager.v1.GetProductRequest; +import com.google.cloud.licensemanager.v1.Instance; +import com.google.cloud.licensemanager.v1.ListConfigurationsRequest; +import com.google.cloud.licensemanager.v1.ListConfigurationsResponse; +import com.google.cloud.licensemanager.v1.ListInstancesRequest; +import com.google.cloud.licensemanager.v1.ListInstancesResponse; +import com.google.cloud.licensemanager.v1.ListProductsRequest; +import com.google.cloud.licensemanager.v1.ListProductsResponse; +import com.google.cloud.licensemanager.v1.OperationMetadata; +import com.google.cloud.licensemanager.v1.Product; +import com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest; +import com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse; +import com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest; +import com.google.cloud.licensemanager.v1.UpdateConfigurationRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the LicenseManager service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcLicenseManagerStub extends LicenseManagerStub { + private static final MethodDescriptor + listConfigurationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.licensemanager.v1.LicenseManager/ListConfigurations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListConfigurationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListConfigurationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getConfigurationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.licensemanager.v1.LicenseManager/GetConfiguration") + .setRequestMarshaller( + ProtoUtils.marshaller(GetConfigurationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Configuration.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createConfigurationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.licensemanager.v1.LicenseManager/CreateConfiguration") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateConfigurationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateConfigurationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.licensemanager.v1.LicenseManager/UpdateConfiguration") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateConfigurationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteConfigurationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.licensemanager.v1.LicenseManager/DeleteConfiguration") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteConfigurationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listInstancesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.licensemanager.v1.LicenseManager/ListInstances") + .setRequestMarshaller( + ProtoUtils.marshaller(ListInstancesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListInstancesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getInstanceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.licensemanager.v1.LicenseManager/GetInstance") + .setRequestMarshaller(ProtoUtils.marshaller(GetInstanceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deactivateConfigurationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.licensemanager.v1.LicenseManager/DeactivateConfiguration") + .setRequestMarshaller( + ProtoUtils.marshaller(DeactivateConfigurationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + reactivateConfigurationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.licensemanager.v1.LicenseManager/ReactivateConfiguration") + .setRequestMarshaller( + ProtoUtils.marshaller(ReactivateConfigurationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + QueryConfigurationLicenseUsageRequest, QueryConfigurationLicenseUsageResponse> + queryConfigurationLicenseUsageMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.licensemanager.v1.LicenseManager/QueryConfigurationLicenseUsage") + .setRequestMarshaller( + ProtoUtils.marshaller(QueryConfigurationLicenseUsageRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + QueryConfigurationLicenseUsageResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + aggregateUsageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.licensemanager.v1.LicenseManager/AggregateUsage") + .setRequestMarshaller( + ProtoUtils.marshaller(AggregateUsageRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AggregateUsageResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listProductsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.licensemanager.v1.LicenseManager/ListProducts") + .setRequestMarshaller(ProtoUtils.marshaller(ListProductsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListProductsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getProductMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.licensemanager.v1.LicenseManager/GetProduct") + .setRequestMarshaller(ProtoUtils.marshaller(GetProductRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Product.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private final UnaryCallable + listConfigurationsCallable; + private final UnaryCallable + listConfigurationsPagedCallable; + private final UnaryCallable getConfigurationCallable; + private final UnaryCallable createConfigurationCallable; + private final OperationCallable + createConfigurationOperationCallable; + private final UnaryCallable updateConfigurationCallable; + private final OperationCallable + updateConfigurationOperationCallable; + private final UnaryCallable deleteConfigurationCallable; + private final OperationCallable + deleteConfigurationOperationCallable; + private final UnaryCallable listInstancesCallable; + private final UnaryCallable + listInstancesPagedCallable; + private final UnaryCallable getInstanceCallable; + private final UnaryCallable + deactivateConfigurationCallable; + private final OperationCallable + deactivateConfigurationOperationCallable; + private final UnaryCallable + reactivateConfigurationCallable; + private final OperationCallable + reactivateConfigurationOperationCallable; + private final UnaryCallable< + QueryConfigurationLicenseUsageRequest, QueryConfigurationLicenseUsageResponse> + queryConfigurationLicenseUsageCallable; + private final UnaryCallable aggregateUsageCallable; + private final UnaryCallable + aggregateUsagePagedCallable; + private final UnaryCallable listProductsCallable; + private final UnaryCallable + listProductsPagedCallable; + private final UnaryCallable getProductCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcLicenseManagerStub create(LicenseManagerStubSettings settings) + throws IOException { + return new GrpcLicenseManagerStub(settings, ClientContext.create(settings)); + } + + public static final GrpcLicenseManagerStub create(ClientContext clientContext) + throws IOException { + return new GrpcLicenseManagerStub( + LicenseManagerStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcLicenseManagerStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcLicenseManagerStub( + LicenseManagerStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcLicenseManagerStub, 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 GrpcLicenseManagerStub(LicenseManagerStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcLicenseManagerCallableFactory()); + } + + /** + * Constructs an instance of GrpcLicenseManagerStub, 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 GrpcLicenseManagerStub( + LicenseManagerStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listConfigurationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listConfigurationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getConfigurationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getConfigurationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createConfigurationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createConfigurationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateConfigurationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateConfigurationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "configuration.name", String.valueOf(request.getConfiguration().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteConfigurationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteConfigurationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listInstancesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listInstancesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getInstanceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getInstanceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deactivateConfigurationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deactivateConfigurationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + reactivateConfigurationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(reactivateConfigurationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + queryConfigurationLicenseUsageTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(queryConfigurationLicenseUsageMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + aggregateUsageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(aggregateUsageMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listProductsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listProductsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getProductTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getProductMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listConfigurationsCallable = + callableFactory.createUnaryCallable( + listConfigurationsTransportSettings, + settings.listConfigurationsSettings(), + clientContext); + this.listConfigurationsPagedCallable = + callableFactory.createPagedCallable( + listConfigurationsTransportSettings, + settings.listConfigurationsSettings(), + clientContext); + this.getConfigurationCallable = + callableFactory.createUnaryCallable( + getConfigurationTransportSettings, settings.getConfigurationSettings(), clientContext); + this.createConfigurationCallable = + callableFactory.createUnaryCallable( + createConfigurationTransportSettings, + settings.createConfigurationSettings(), + clientContext); + this.createConfigurationOperationCallable = + callableFactory.createOperationCallable( + createConfigurationTransportSettings, + settings.createConfigurationOperationSettings(), + clientContext, + operationsStub); + this.updateConfigurationCallable = + callableFactory.createUnaryCallable( + updateConfigurationTransportSettings, + settings.updateConfigurationSettings(), + clientContext); + this.updateConfigurationOperationCallable = + callableFactory.createOperationCallable( + updateConfigurationTransportSettings, + settings.updateConfigurationOperationSettings(), + clientContext, + operationsStub); + this.deleteConfigurationCallable = + callableFactory.createUnaryCallable( + deleteConfigurationTransportSettings, + settings.deleteConfigurationSettings(), + clientContext); + this.deleteConfigurationOperationCallable = + callableFactory.createOperationCallable( + deleteConfigurationTransportSettings, + settings.deleteConfigurationOperationSettings(), + clientContext, + operationsStub); + this.listInstancesCallable = + callableFactory.createUnaryCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.listInstancesPagedCallable = + callableFactory.createPagedCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.getInstanceCallable = + callableFactory.createUnaryCallable( + getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); + this.deactivateConfigurationCallable = + callableFactory.createUnaryCallable( + deactivateConfigurationTransportSettings, + settings.deactivateConfigurationSettings(), + clientContext); + this.deactivateConfigurationOperationCallable = + callableFactory.createOperationCallable( + deactivateConfigurationTransportSettings, + settings.deactivateConfigurationOperationSettings(), + clientContext, + operationsStub); + this.reactivateConfigurationCallable = + callableFactory.createUnaryCallable( + reactivateConfigurationTransportSettings, + settings.reactivateConfigurationSettings(), + clientContext); + this.reactivateConfigurationOperationCallable = + callableFactory.createOperationCallable( + reactivateConfigurationTransportSettings, + settings.reactivateConfigurationOperationSettings(), + clientContext, + operationsStub); + this.queryConfigurationLicenseUsageCallable = + callableFactory.createUnaryCallable( + queryConfigurationLicenseUsageTransportSettings, + settings.queryConfigurationLicenseUsageSettings(), + clientContext); + this.aggregateUsageCallable = + callableFactory.createUnaryCallable( + aggregateUsageTransportSettings, settings.aggregateUsageSettings(), clientContext); + this.aggregateUsagePagedCallable = + callableFactory.createPagedCallable( + aggregateUsageTransportSettings, settings.aggregateUsageSettings(), clientContext); + this.listProductsCallable = + callableFactory.createUnaryCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.listProductsPagedCallable = + callableFactory.createPagedCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.getProductCallable = + callableFactory.createUnaryCallable( + getProductTransportSettings, settings.getProductSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listConfigurationsCallable() { + return listConfigurationsCallable; + } + + @Override + public UnaryCallable + listConfigurationsPagedCallable() { + return listConfigurationsPagedCallable; + } + + @Override + public UnaryCallable getConfigurationCallable() { + return getConfigurationCallable; + } + + @Override + public UnaryCallable createConfigurationCallable() { + return createConfigurationCallable; + } + + @Override + public OperationCallable + createConfigurationOperationCallable() { + return createConfigurationOperationCallable; + } + + @Override + public UnaryCallable updateConfigurationCallable() { + return updateConfigurationCallable; + } + + @Override + public OperationCallable + updateConfigurationOperationCallable() { + return updateConfigurationOperationCallable; + } + + @Override + public UnaryCallable deleteConfigurationCallable() { + return deleteConfigurationCallable; + } + + @Override + public OperationCallable + deleteConfigurationOperationCallable() { + return deleteConfigurationOperationCallable; + } + + @Override + public UnaryCallable listInstancesCallable() { + return listInstancesCallable; + } + + @Override + public UnaryCallable + listInstancesPagedCallable() { + return listInstancesPagedCallable; + } + + @Override + public UnaryCallable getInstanceCallable() { + return getInstanceCallable; + } + + @Override + public UnaryCallable + deactivateConfigurationCallable() { + return deactivateConfigurationCallable; + } + + @Override + public OperationCallable + deactivateConfigurationOperationCallable() { + return deactivateConfigurationOperationCallable; + } + + @Override + public UnaryCallable + reactivateConfigurationCallable() { + return reactivateConfigurationCallable; + } + + @Override + public OperationCallable + reactivateConfigurationOperationCallable() { + return reactivateConfigurationOperationCallable; + } + + @Override + public UnaryCallable< + QueryConfigurationLicenseUsageRequest, QueryConfigurationLicenseUsageResponse> + queryConfigurationLicenseUsageCallable() { + return queryConfigurationLicenseUsageCallable; + } + + @Override + public UnaryCallable aggregateUsageCallable() { + return aggregateUsageCallable; + } + + @Override + public UnaryCallable + aggregateUsagePagedCallable() { + return aggregateUsagePagedCallable; + } + + @Override + public UnaryCallable listProductsCallable() { + return listProductsCallable; + } + + @Override + public UnaryCallable listProductsPagedCallable() { + return listProductsPagedCallable; + } + + @Override + public UnaryCallable getProductCallable() { + return getProductCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @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-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/HttpJsonLicenseManagerCallableFactory.java b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/HttpJsonLicenseManagerCallableFactory.java new file mode 100644 index 000000000000..4abada04733e --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/HttpJsonLicenseManagerCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the LicenseManager service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonLicenseManagerCallableFactory + 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-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/HttpJsonLicenseManagerStub.java b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/HttpJsonLicenseManagerStub.java new file mode 100644 index 000000000000..ecc4c27b4bf9 --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/HttpJsonLicenseManagerStub.java @@ -0,0 +1,1269 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.stub; + +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.AggregateUsagePagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListConfigurationsPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListInstancesPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListLocationsPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListProductsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.licensemanager.v1.AggregateUsageRequest; +import com.google.cloud.licensemanager.v1.AggregateUsageResponse; +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.CreateConfigurationRequest; +import com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest; +import com.google.cloud.licensemanager.v1.DeleteConfigurationRequest; +import com.google.cloud.licensemanager.v1.GetConfigurationRequest; +import com.google.cloud.licensemanager.v1.GetInstanceRequest; +import com.google.cloud.licensemanager.v1.GetProductRequest; +import com.google.cloud.licensemanager.v1.Instance; +import com.google.cloud.licensemanager.v1.ListConfigurationsRequest; +import com.google.cloud.licensemanager.v1.ListConfigurationsResponse; +import com.google.cloud.licensemanager.v1.ListInstancesRequest; +import com.google.cloud.licensemanager.v1.ListInstancesResponse; +import com.google.cloud.licensemanager.v1.ListProductsRequest; +import com.google.cloud.licensemanager.v1.ListProductsResponse; +import com.google.cloud.licensemanager.v1.OperationMetadata; +import com.google.cloud.licensemanager.v1.Product; +import com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest; +import com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse; +import com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest; +import com.google.cloud.licensemanager.v1.UpdateConfigurationRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the LicenseManager service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonLicenseManagerStub extends LicenseManagerStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(Configuration.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listConfigurationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.licensemanager.v1.LicenseManager/ListConfigurations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/configurations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListConfigurationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getConfigurationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.licensemanager.v1.LicenseManager/GetConfiguration") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/configurations/*}", + 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(Configuration.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createConfigurationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.licensemanager.v1.LicenseManager/CreateConfiguration") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/configurations", + 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, "configurationId", request.getConfigurationId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("configuration", request.getConfiguration(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateConfigurationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateConfigurationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.licensemanager.v1.LicenseManager/UpdateConfiguration") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{configuration.name=projects/*/locations/*/configurations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "configuration.name", request.getConfiguration().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("configuration", request.getConfiguration(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateConfigurationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteConfigurationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.licensemanager.v1.LicenseManager/DeleteConfiguration") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/configurations/*}", + 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, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteConfigurationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listInstancesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.licensemanager.v1.LicenseManager/ListInstances") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/instances", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListInstancesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getInstanceMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.licensemanager.v1.LicenseManager/GetInstance") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/instances/*}", + 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(Instance.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deactivateConfigurationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.licensemanager.v1.LicenseManager/DeactivateConfiguration") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/configurations/*}:deactivate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeactivateConfigurationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + reactivateConfigurationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.licensemanager.v1.LicenseManager/ReactivateConfiguration") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/configurations/*}:reactivate", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ReactivateConfigurationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + QueryConfigurationLicenseUsageRequest, QueryConfigurationLicenseUsageResponse> + queryConfigurationLicenseUsageMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.licensemanager.v1.LicenseManager/QueryConfigurationLicenseUsage") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/configurations/*}:queryLicenseUsage", + 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, "endTime", request.getEndTime()); + serializer.putQueryParam(fields, "startTime", request.getStartTime()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance( + QueryConfigurationLicenseUsageResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + aggregateUsageMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.licensemanager.v1.LicenseManager/AggregateUsage") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/configurations/*}:aggregateUsage", + 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, "endTime", request.getEndTime()); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "startTime", request.getStartTime()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AggregateUsageResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listProductsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.licensemanager.v1.LicenseManager/ListProducts") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/products", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListProductsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getProductMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.licensemanager.v1.LicenseManager/GetProduct") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/products/*}", + 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(Product.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + 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(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + 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(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + listConfigurationsCallable; + private final UnaryCallable + listConfigurationsPagedCallable; + private final UnaryCallable getConfigurationCallable; + private final UnaryCallable createConfigurationCallable; + private final OperationCallable + createConfigurationOperationCallable; + private final UnaryCallable updateConfigurationCallable; + private final OperationCallable + updateConfigurationOperationCallable; + private final UnaryCallable deleteConfigurationCallable; + private final OperationCallable + deleteConfigurationOperationCallable; + private final UnaryCallable listInstancesCallable; + private final UnaryCallable + listInstancesPagedCallable; + private final UnaryCallable getInstanceCallable; + private final UnaryCallable + deactivateConfigurationCallable; + private final OperationCallable + deactivateConfigurationOperationCallable; + private final UnaryCallable + reactivateConfigurationCallable; + private final OperationCallable + reactivateConfigurationOperationCallable; + private final UnaryCallable< + QueryConfigurationLicenseUsageRequest, QueryConfigurationLicenseUsageResponse> + queryConfigurationLicenseUsageCallable; + private final UnaryCallable aggregateUsageCallable; + private final UnaryCallable + aggregateUsagePagedCallable; + private final UnaryCallable listProductsCallable; + private final UnaryCallable + listProductsPagedCallable; + private final UnaryCallable getProductCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonLicenseManagerStub create(LicenseManagerStubSettings settings) + throws IOException { + return new HttpJsonLicenseManagerStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonLicenseManagerStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonLicenseManagerStub( + LicenseManagerStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonLicenseManagerStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonLicenseManagerStub( + LicenseManagerStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonLicenseManagerStub, 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 HttpJsonLicenseManagerStub( + LicenseManagerStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonLicenseManagerCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonLicenseManagerStub, 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 HttpJsonLicenseManagerStub( + LicenseManagerStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings + listConfigurationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listConfigurationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getConfigurationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getConfigurationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createConfigurationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createConfigurationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateConfigurationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateConfigurationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "configuration.name", + String.valueOf(request.getConfiguration().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteConfigurationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteConfigurationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listInstancesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listInstancesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getInstanceTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getInstanceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deactivateConfigurationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deactivateConfigurationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + reactivateConfigurationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(reactivateConfigurationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings< + QueryConfigurationLicenseUsageRequest, QueryConfigurationLicenseUsageResponse> + queryConfigurationLicenseUsageTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(queryConfigurationLicenseUsageMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + aggregateUsageTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(aggregateUsageMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listProductsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listProductsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getProductTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getProductMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listConfigurationsCallable = + callableFactory.createUnaryCallable( + listConfigurationsTransportSettings, + settings.listConfigurationsSettings(), + clientContext); + this.listConfigurationsPagedCallable = + callableFactory.createPagedCallable( + listConfigurationsTransportSettings, + settings.listConfigurationsSettings(), + clientContext); + this.getConfigurationCallable = + callableFactory.createUnaryCallable( + getConfigurationTransportSettings, settings.getConfigurationSettings(), clientContext); + this.createConfigurationCallable = + callableFactory.createUnaryCallable( + createConfigurationTransportSettings, + settings.createConfigurationSettings(), + clientContext); + this.createConfigurationOperationCallable = + callableFactory.createOperationCallable( + createConfigurationTransportSettings, + settings.createConfigurationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateConfigurationCallable = + callableFactory.createUnaryCallable( + updateConfigurationTransportSettings, + settings.updateConfigurationSettings(), + clientContext); + this.updateConfigurationOperationCallable = + callableFactory.createOperationCallable( + updateConfigurationTransportSettings, + settings.updateConfigurationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteConfigurationCallable = + callableFactory.createUnaryCallable( + deleteConfigurationTransportSettings, + settings.deleteConfigurationSettings(), + clientContext); + this.deleteConfigurationOperationCallable = + callableFactory.createOperationCallable( + deleteConfigurationTransportSettings, + settings.deleteConfigurationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listInstancesCallable = + callableFactory.createUnaryCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.listInstancesPagedCallable = + callableFactory.createPagedCallable( + listInstancesTransportSettings, settings.listInstancesSettings(), clientContext); + this.getInstanceCallable = + callableFactory.createUnaryCallable( + getInstanceTransportSettings, settings.getInstanceSettings(), clientContext); + this.deactivateConfigurationCallable = + callableFactory.createUnaryCallable( + deactivateConfigurationTransportSettings, + settings.deactivateConfigurationSettings(), + clientContext); + this.deactivateConfigurationOperationCallable = + callableFactory.createOperationCallable( + deactivateConfigurationTransportSettings, + settings.deactivateConfigurationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.reactivateConfigurationCallable = + callableFactory.createUnaryCallable( + reactivateConfigurationTransportSettings, + settings.reactivateConfigurationSettings(), + clientContext); + this.reactivateConfigurationOperationCallable = + callableFactory.createOperationCallable( + reactivateConfigurationTransportSettings, + settings.reactivateConfigurationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.queryConfigurationLicenseUsageCallable = + callableFactory.createUnaryCallable( + queryConfigurationLicenseUsageTransportSettings, + settings.queryConfigurationLicenseUsageSettings(), + clientContext); + this.aggregateUsageCallable = + callableFactory.createUnaryCallable( + aggregateUsageTransportSettings, settings.aggregateUsageSettings(), clientContext); + this.aggregateUsagePagedCallable = + callableFactory.createPagedCallable( + aggregateUsageTransportSettings, settings.aggregateUsageSettings(), clientContext); + this.listProductsCallable = + callableFactory.createUnaryCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.listProductsPagedCallable = + callableFactory.createPagedCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.getProductCallable = + callableFactory.createUnaryCallable( + getProductTransportSettings, settings.getProductSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listConfigurationsMethodDescriptor); + methodDescriptors.add(getConfigurationMethodDescriptor); + methodDescriptors.add(createConfigurationMethodDescriptor); + methodDescriptors.add(updateConfigurationMethodDescriptor); + methodDescriptors.add(deleteConfigurationMethodDescriptor); + methodDescriptors.add(listInstancesMethodDescriptor); + methodDescriptors.add(getInstanceMethodDescriptor); + methodDescriptors.add(deactivateConfigurationMethodDescriptor); + methodDescriptors.add(reactivateConfigurationMethodDescriptor); + methodDescriptors.add(queryConfigurationLicenseUsageMethodDescriptor); + methodDescriptors.add(aggregateUsageMethodDescriptor); + methodDescriptors.add(listProductsMethodDescriptor); + methodDescriptors.add(getProductMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable + listConfigurationsCallable() { + return listConfigurationsCallable; + } + + @Override + public UnaryCallable + listConfigurationsPagedCallable() { + return listConfigurationsPagedCallable; + } + + @Override + public UnaryCallable getConfigurationCallable() { + return getConfigurationCallable; + } + + @Override + public UnaryCallable createConfigurationCallable() { + return createConfigurationCallable; + } + + @Override + public OperationCallable + createConfigurationOperationCallable() { + return createConfigurationOperationCallable; + } + + @Override + public UnaryCallable updateConfigurationCallable() { + return updateConfigurationCallable; + } + + @Override + public OperationCallable + updateConfigurationOperationCallable() { + return updateConfigurationOperationCallable; + } + + @Override + public UnaryCallable deleteConfigurationCallable() { + return deleteConfigurationCallable; + } + + @Override + public OperationCallable + deleteConfigurationOperationCallable() { + return deleteConfigurationOperationCallable; + } + + @Override + public UnaryCallable listInstancesCallable() { + return listInstancesCallable; + } + + @Override + public UnaryCallable + listInstancesPagedCallable() { + return listInstancesPagedCallable; + } + + @Override + public UnaryCallable getInstanceCallable() { + return getInstanceCallable; + } + + @Override + public UnaryCallable + deactivateConfigurationCallable() { + return deactivateConfigurationCallable; + } + + @Override + public OperationCallable + deactivateConfigurationOperationCallable() { + return deactivateConfigurationOperationCallable; + } + + @Override + public UnaryCallable + reactivateConfigurationCallable() { + return reactivateConfigurationCallable; + } + + @Override + public OperationCallable + reactivateConfigurationOperationCallable() { + return reactivateConfigurationOperationCallable; + } + + @Override + public UnaryCallable< + QueryConfigurationLicenseUsageRequest, QueryConfigurationLicenseUsageResponse> + queryConfigurationLicenseUsageCallable() { + return queryConfigurationLicenseUsageCallable; + } + + @Override + public UnaryCallable aggregateUsageCallable() { + return aggregateUsageCallable; + } + + @Override + public UnaryCallable + aggregateUsagePagedCallable() { + return aggregateUsagePagedCallable; + } + + @Override + public UnaryCallable listProductsCallable() { + return listProductsCallable; + } + + @Override + public UnaryCallable listProductsPagedCallable() { + return listProductsPagedCallable; + } + + @Override + public UnaryCallable getProductCallable() { + return getProductCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @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-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/LicenseManagerStub.java b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/LicenseManagerStub.java new file mode 100644 index 000000000000..8bf6bcfaed69 --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/LicenseManagerStub.java @@ -0,0 +1,198 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.stub; + +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.AggregateUsagePagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListConfigurationsPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListInstancesPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListLocationsPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListProductsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.licensemanager.v1.AggregateUsageRequest; +import com.google.cloud.licensemanager.v1.AggregateUsageResponse; +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.CreateConfigurationRequest; +import com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest; +import com.google.cloud.licensemanager.v1.DeleteConfigurationRequest; +import com.google.cloud.licensemanager.v1.GetConfigurationRequest; +import com.google.cloud.licensemanager.v1.GetInstanceRequest; +import com.google.cloud.licensemanager.v1.GetProductRequest; +import com.google.cloud.licensemanager.v1.Instance; +import com.google.cloud.licensemanager.v1.ListConfigurationsRequest; +import com.google.cloud.licensemanager.v1.ListConfigurationsResponse; +import com.google.cloud.licensemanager.v1.ListInstancesRequest; +import com.google.cloud.licensemanager.v1.ListInstancesResponse; +import com.google.cloud.licensemanager.v1.ListProductsRequest; +import com.google.cloud.licensemanager.v1.ListProductsResponse; +import com.google.cloud.licensemanager.v1.OperationMetadata; +import com.google.cloud.licensemanager.v1.Product; +import com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest; +import com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse; +import com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest; +import com.google.cloud.licensemanager.v1.UpdateConfigurationRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the LicenseManager service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class LicenseManagerStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable + listConfigurationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listConfigurationsPagedCallable()"); + } + + public UnaryCallable + listConfigurationsCallable() { + throw new UnsupportedOperationException("Not implemented: listConfigurationsCallable()"); + } + + public UnaryCallable getConfigurationCallable() { + throw new UnsupportedOperationException("Not implemented: getConfigurationCallable()"); + } + + public OperationCallable + createConfigurationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createConfigurationOperationCallable()"); + } + + public UnaryCallable createConfigurationCallable() { + throw new UnsupportedOperationException("Not implemented: createConfigurationCallable()"); + } + + public OperationCallable + updateConfigurationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateConfigurationOperationCallable()"); + } + + public UnaryCallable updateConfigurationCallable() { + throw new UnsupportedOperationException("Not implemented: updateConfigurationCallable()"); + } + + public OperationCallable + deleteConfigurationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteConfigurationOperationCallable()"); + } + + public UnaryCallable deleteConfigurationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteConfigurationCallable()"); + } + + public UnaryCallable + listInstancesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listInstancesPagedCallable()"); + } + + public UnaryCallable listInstancesCallable() { + throw new UnsupportedOperationException("Not implemented: listInstancesCallable()"); + } + + public UnaryCallable getInstanceCallable() { + throw new UnsupportedOperationException("Not implemented: getInstanceCallable()"); + } + + public OperationCallable + deactivateConfigurationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deactivateConfigurationOperationCallable()"); + } + + public UnaryCallable + deactivateConfigurationCallable() { + throw new UnsupportedOperationException("Not implemented: deactivateConfigurationCallable()"); + } + + public OperationCallable + reactivateConfigurationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: reactivateConfigurationOperationCallable()"); + } + + public UnaryCallable + reactivateConfigurationCallable() { + throw new UnsupportedOperationException("Not implemented: reactivateConfigurationCallable()"); + } + + public UnaryCallable< + QueryConfigurationLicenseUsageRequest, QueryConfigurationLicenseUsageResponse> + queryConfigurationLicenseUsageCallable() { + throw new UnsupportedOperationException( + "Not implemented: queryConfigurationLicenseUsageCallable()"); + } + + public UnaryCallable + aggregateUsagePagedCallable() { + throw new UnsupportedOperationException("Not implemented: aggregateUsagePagedCallable()"); + } + + public UnaryCallable aggregateUsageCallable() { + throw new UnsupportedOperationException("Not implemented: aggregateUsageCallable()"); + } + + public UnaryCallable listProductsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listProductsPagedCallable()"); + } + + public UnaryCallable listProductsCallable() { + throw new UnsupportedOperationException("Not implemented: listProductsCallable()"); + } + + public UnaryCallable getProductCallable() { + throw new UnsupportedOperationException("Not implemented: getProductCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/LicenseManagerStubSettings.java b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/LicenseManagerStubSettings.java new file mode 100644 index 000000000000..75ee1d75d9b1 --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/LicenseManagerStubSettings.java @@ -0,0 +1,1302 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.stub; + +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.AggregateUsagePagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListConfigurationsPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListInstancesPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListLocationsPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListProductsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.licensemanager.v1.AggregateUsageRequest; +import com.google.cloud.licensemanager.v1.AggregateUsageResponse; +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.CreateConfigurationRequest; +import com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest; +import com.google.cloud.licensemanager.v1.DeleteConfigurationRequest; +import com.google.cloud.licensemanager.v1.GetConfigurationRequest; +import com.google.cloud.licensemanager.v1.GetInstanceRequest; +import com.google.cloud.licensemanager.v1.GetProductRequest; +import com.google.cloud.licensemanager.v1.Instance; +import com.google.cloud.licensemanager.v1.ListConfigurationsRequest; +import com.google.cloud.licensemanager.v1.ListConfigurationsResponse; +import com.google.cloud.licensemanager.v1.ListInstancesRequest; +import com.google.cloud.licensemanager.v1.ListInstancesResponse; +import com.google.cloud.licensemanager.v1.ListProductsRequest; +import com.google.cloud.licensemanager.v1.ListProductsResponse; +import com.google.cloud.licensemanager.v1.OperationMetadata; +import com.google.cloud.licensemanager.v1.Product; +import com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest; +import com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse; +import com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest; +import com.google.cloud.licensemanager.v1.UpdateConfigurationRequest; +import com.google.cloud.licensemanager.v1.Usage; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link LicenseManagerStub}. + * + *

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

    + *
  • The default service address (licensemanager.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 getConfiguration: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * LicenseManagerStubSettings.Builder licenseManagerSettingsBuilder =
+ *     LicenseManagerStubSettings.newBuilder();
+ * licenseManagerSettingsBuilder
+ *     .getConfigurationSettings()
+ *     .setRetrySettings(
+ *         licenseManagerSettingsBuilder
+ *             .getConfigurationSettings()
+ *             .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());
+ * LicenseManagerStubSettings licenseManagerSettings = licenseManagerSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for + * additional support in setting retries. + * + *

To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createConfiguration: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * LicenseManagerStubSettings.Builder licenseManagerSettingsBuilder =
+ *     LicenseManagerStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * licenseManagerSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class LicenseManagerStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListConfigurationsRequest, ListConfigurationsResponse, ListConfigurationsPagedResponse> + listConfigurationsSettings; + private final UnaryCallSettings getConfigurationSettings; + private final UnaryCallSettings + createConfigurationSettings; + private final OperationCallSettings + createConfigurationOperationSettings; + private final UnaryCallSettings + updateConfigurationSettings; + private final OperationCallSettings + updateConfigurationOperationSettings; + private final UnaryCallSettings + deleteConfigurationSettings; + private final OperationCallSettings + deleteConfigurationOperationSettings; + private final PagedCallSettings< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings; + private final UnaryCallSettings getInstanceSettings; + private final UnaryCallSettings + deactivateConfigurationSettings; + private final OperationCallSettings< + DeactivateConfigurationRequest, Configuration, OperationMetadata> + deactivateConfigurationOperationSettings; + private final UnaryCallSettings + reactivateConfigurationSettings; + private final OperationCallSettings< + ReactivateConfigurationRequest, Configuration, OperationMetadata> + reactivateConfigurationOperationSettings; + private final UnaryCallSettings< + QueryConfigurationLicenseUsageRequest, QueryConfigurationLicenseUsageResponse> + queryConfigurationLicenseUsageSettings; + private final PagedCallSettings< + AggregateUsageRequest, AggregateUsageResponse, AggregateUsagePagedResponse> + aggregateUsageSettings; + private final PagedCallSettings< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings; + private final UnaryCallSettings getProductSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor< + ListConfigurationsRequest, ListConfigurationsResponse, Configuration> + LIST_CONFIGURATIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListConfigurationsRequest, ListConfigurationsResponse, Configuration>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListConfigurationsRequest injectToken( + ListConfigurationsRequest payload, String token) { + return ListConfigurationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListConfigurationsRequest injectPageSize( + ListConfigurationsRequest payload, int pageSize) { + return ListConfigurationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListConfigurationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListConfigurationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListConfigurationsResponse payload) { + return payload.getConfigurationsList(); + } + }; + + private static final PagedListDescriptor + LIST_INSTANCES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListInstancesRequest injectToken(ListInstancesRequest payload, String token) { + return ListInstancesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListInstancesRequest injectPageSize(ListInstancesRequest payload, int pageSize) { + return ListInstancesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListInstancesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListInstancesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListInstancesResponse payload) { + return payload.getInstancesList(); + } + }; + + private static final PagedListDescriptor + AGGREGATE_USAGE_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public AggregateUsageRequest injectToken(AggregateUsageRequest payload, String token) { + return AggregateUsageRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public AggregateUsageRequest injectPageSize( + AggregateUsageRequest payload, int pageSize) { + return AggregateUsageRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(AggregateUsageRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(AggregateUsageResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(AggregateUsageResponse payload) { + return payload.getUsagesList(); + } + }; + + private static final PagedListDescriptor + LIST_PRODUCTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListProductsRequest injectToken(ListProductsRequest payload, String token) { + return ListProductsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListProductsRequest injectPageSize(ListProductsRequest payload, int pageSize) { + return ListProductsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListProductsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListProductsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListProductsResponse payload) { + return payload.getProductsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListConfigurationsRequest, ListConfigurationsResponse, ListConfigurationsPagedResponse> + LIST_CONFIGURATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListConfigurationsRequest, + ListConfigurationsResponse, + ListConfigurationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListConfigurationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_CONFIGURATIONS_PAGE_STR_DESC, request, context); + return ListConfigurationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + LIST_INSTANCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListInstancesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_INSTANCES_PAGE_STR_DESC, request, context); + return ListInstancesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + AggregateUsageRequest, AggregateUsageResponse, AggregateUsagePagedResponse> + AGGREGATE_USAGE_PAGE_STR_FACT = + new PagedListResponseFactory< + AggregateUsageRequest, AggregateUsageResponse, AggregateUsagePagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + AggregateUsageRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, AGGREGATE_USAGE_PAGE_STR_DESC, request, context); + return AggregateUsagePagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + LIST_PRODUCTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListProductsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PRODUCTS_PAGE_STR_DESC, request, context); + return ListProductsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listConfigurations. */ + public PagedCallSettings< + ListConfigurationsRequest, ListConfigurationsResponse, ListConfigurationsPagedResponse> + listConfigurationsSettings() { + return listConfigurationsSettings; + } + + /** Returns the object with the settings used for calls to getConfiguration. */ + public UnaryCallSettings getConfigurationSettings() { + return getConfigurationSettings; + } + + /** Returns the object with the settings used for calls to createConfiguration. */ + public UnaryCallSettings createConfigurationSettings() { + return createConfigurationSettings; + } + + /** Returns the object with the settings used for calls to createConfiguration. */ + public OperationCallSettings + createConfigurationOperationSettings() { + return createConfigurationOperationSettings; + } + + /** Returns the object with the settings used for calls to updateConfiguration. */ + public UnaryCallSettings updateConfigurationSettings() { + return updateConfigurationSettings; + } + + /** Returns the object with the settings used for calls to updateConfiguration. */ + public OperationCallSettings + updateConfigurationOperationSettings() { + return updateConfigurationOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteConfiguration. */ + public UnaryCallSettings deleteConfigurationSettings() { + return deleteConfigurationSettings; + } + + /** Returns the object with the settings used for calls to deleteConfiguration. */ + public OperationCallSettings + deleteConfigurationOperationSettings() { + return deleteConfigurationOperationSettings; + } + + /** Returns the object with the settings used for calls to listInstances. */ + public PagedCallSettings + listInstancesSettings() { + return listInstancesSettings; + } + + /** Returns the object with the settings used for calls to getInstance. */ + public UnaryCallSettings getInstanceSettings() { + return getInstanceSettings; + } + + /** Returns the object with the settings used for calls to deactivateConfiguration. */ + public UnaryCallSettings + deactivateConfigurationSettings() { + return deactivateConfigurationSettings; + } + + /** Returns the object with the settings used for calls to deactivateConfiguration. */ + public OperationCallSettings + deactivateConfigurationOperationSettings() { + return deactivateConfigurationOperationSettings; + } + + /** Returns the object with the settings used for calls to reactivateConfiguration. */ + public UnaryCallSettings + reactivateConfigurationSettings() { + return reactivateConfigurationSettings; + } + + /** Returns the object with the settings used for calls to reactivateConfiguration. */ + public OperationCallSettings + reactivateConfigurationOperationSettings() { + return reactivateConfigurationOperationSettings; + } + + /** Returns the object with the settings used for calls to queryConfigurationLicenseUsage. */ + public UnaryCallSettings< + QueryConfigurationLicenseUsageRequest, QueryConfigurationLicenseUsageResponse> + queryConfigurationLicenseUsageSettings() { + return queryConfigurationLicenseUsageSettings; + } + + /** Returns the object with the settings used for calls to aggregateUsage. */ + public PagedCallSettings< + AggregateUsageRequest, AggregateUsageResponse, AggregateUsagePagedResponse> + aggregateUsageSettings() { + return aggregateUsageSettings; + } + + /** Returns the object with the settings used for calls to listProducts. */ + public PagedCallSettings + listProductsSettings() { + return listProductsSettings; + } + + /** Returns the object with the settings used for calls to getProduct. */ + public UnaryCallSettings getProductSettings() { + return getProductSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public LicenseManagerStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcLicenseManagerStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonLicenseManagerStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "licensemanager"; + } + + /** 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 "licensemanager.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "licensemanager.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(LicenseManagerStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(LicenseManagerStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return LicenseManagerStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected LicenseManagerStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listConfigurationsSettings = settingsBuilder.listConfigurationsSettings().build(); + getConfigurationSettings = settingsBuilder.getConfigurationSettings().build(); + createConfigurationSettings = settingsBuilder.createConfigurationSettings().build(); + createConfigurationOperationSettings = + settingsBuilder.createConfigurationOperationSettings().build(); + updateConfigurationSettings = settingsBuilder.updateConfigurationSettings().build(); + updateConfigurationOperationSettings = + settingsBuilder.updateConfigurationOperationSettings().build(); + deleteConfigurationSettings = settingsBuilder.deleteConfigurationSettings().build(); + deleteConfigurationOperationSettings = + settingsBuilder.deleteConfigurationOperationSettings().build(); + listInstancesSettings = settingsBuilder.listInstancesSettings().build(); + getInstanceSettings = settingsBuilder.getInstanceSettings().build(); + deactivateConfigurationSettings = settingsBuilder.deactivateConfigurationSettings().build(); + deactivateConfigurationOperationSettings = + settingsBuilder.deactivateConfigurationOperationSettings().build(); + reactivateConfigurationSettings = settingsBuilder.reactivateConfigurationSettings().build(); + reactivateConfigurationOperationSettings = + settingsBuilder.reactivateConfigurationOperationSettings().build(); + queryConfigurationLicenseUsageSettings = + settingsBuilder.queryConfigurationLicenseUsageSettings().build(); + aggregateUsageSettings = settingsBuilder.aggregateUsageSettings().build(); + listProductsSettings = settingsBuilder.listProductsSettings().build(); + getProductSettings = settingsBuilder.getProductSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for LicenseManagerStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListConfigurationsRequest, ListConfigurationsResponse, ListConfigurationsPagedResponse> + listConfigurationsSettings; + private final UnaryCallSettings.Builder + getConfigurationSettings; + private final UnaryCallSettings.Builder + createConfigurationSettings; + private final OperationCallSettings.Builder< + CreateConfigurationRequest, Configuration, OperationMetadata> + createConfigurationOperationSettings; + private final UnaryCallSettings.Builder + updateConfigurationSettings; + private final OperationCallSettings.Builder< + UpdateConfigurationRequest, Configuration, OperationMetadata> + updateConfigurationOperationSettings; + private final UnaryCallSettings.Builder + deleteConfigurationSettings; + private final OperationCallSettings.Builder< + DeleteConfigurationRequest, Empty, OperationMetadata> + deleteConfigurationOperationSettings; + private final PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings; + private final UnaryCallSettings.Builder getInstanceSettings; + private final UnaryCallSettings.Builder + deactivateConfigurationSettings; + private final OperationCallSettings.Builder< + DeactivateConfigurationRequest, Configuration, OperationMetadata> + deactivateConfigurationOperationSettings; + private final UnaryCallSettings.Builder + reactivateConfigurationSettings; + private final OperationCallSettings.Builder< + ReactivateConfigurationRequest, Configuration, OperationMetadata> + reactivateConfigurationOperationSettings; + private final UnaryCallSettings.Builder< + QueryConfigurationLicenseUsageRequest, QueryConfigurationLicenseUsageResponse> + queryConfigurationLicenseUsageSettings; + private final PagedCallSettings.Builder< + AggregateUsageRequest, AggregateUsageResponse, AggregateUsagePagedResponse> + aggregateUsageSettings; + private final PagedCallSettings.Builder< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings; + private final UnaryCallSettings.Builder getProductSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + 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))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .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); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listConfigurationsSettings = PagedCallSettings.newBuilder(LIST_CONFIGURATIONS_PAGE_STR_FACT); + getConfigurationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createConfigurationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createConfigurationOperationSettings = OperationCallSettings.newBuilder(); + updateConfigurationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateConfigurationOperationSettings = OperationCallSettings.newBuilder(); + deleteConfigurationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteConfigurationOperationSettings = OperationCallSettings.newBuilder(); + listInstancesSettings = PagedCallSettings.newBuilder(LIST_INSTANCES_PAGE_STR_FACT); + getInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deactivateConfigurationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deactivateConfigurationOperationSettings = OperationCallSettings.newBuilder(); + reactivateConfigurationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + reactivateConfigurationOperationSettings = OperationCallSettings.newBuilder(); + queryConfigurationLicenseUsageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + aggregateUsageSettings = PagedCallSettings.newBuilder(AGGREGATE_USAGE_PAGE_STR_FACT); + listProductsSettings = PagedCallSettings.newBuilder(LIST_PRODUCTS_PAGE_STR_FACT); + getProductSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listConfigurationsSettings, + getConfigurationSettings, + createConfigurationSettings, + updateConfigurationSettings, + deleteConfigurationSettings, + listInstancesSettings, + getInstanceSettings, + deactivateConfigurationSettings, + reactivateConfigurationSettings, + queryConfigurationLicenseUsageSettings, + aggregateUsageSettings, + listProductsSettings, + getProductSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(LicenseManagerStubSettings settings) { + super(settings); + + listConfigurationsSettings = settings.listConfigurationsSettings.toBuilder(); + getConfigurationSettings = settings.getConfigurationSettings.toBuilder(); + createConfigurationSettings = settings.createConfigurationSettings.toBuilder(); + createConfigurationOperationSettings = + settings.createConfigurationOperationSettings.toBuilder(); + updateConfigurationSettings = settings.updateConfigurationSettings.toBuilder(); + updateConfigurationOperationSettings = + settings.updateConfigurationOperationSettings.toBuilder(); + deleteConfigurationSettings = settings.deleteConfigurationSettings.toBuilder(); + deleteConfigurationOperationSettings = + settings.deleteConfigurationOperationSettings.toBuilder(); + listInstancesSettings = settings.listInstancesSettings.toBuilder(); + getInstanceSettings = settings.getInstanceSettings.toBuilder(); + deactivateConfigurationSettings = settings.deactivateConfigurationSettings.toBuilder(); + deactivateConfigurationOperationSettings = + settings.deactivateConfigurationOperationSettings.toBuilder(); + reactivateConfigurationSettings = settings.reactivateConfigurationSettings.toBuilder(); + reactivateConfigurationOperationSettings = + settings.reactivateConfigurationOperationSettings.toBuilder(); + queryConfigurationLicenseUsageSettings = + settings.queryConfigurationLicenseUsageSettings.toBuilder(); + aggregateUsageSettings = settings.aggregateUsageSettings.toBuilder(); + listProductsSettings = settings.listProductsSettings.toBuilder(); + getProductSettings = settings.getProductSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listConfigurationsSettings, + getConfigurationSettings, + createConfigurationSettings, + updateConfigurationSettings, + deleteConfigurationSettings, + listInstancesSettings, + getInstanceSettings, + deactivateConfigurationSettings, + reactivateConfigurationSettings, + queryConfigurationLicenseUsageSettings, + aggregateUsageSettings, + listProductsSettings, + getProductSettings, + listLocationsSettings, + getLocationSettings); + } + + 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 + .listConfigurationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getConfigurationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createConfigurationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateConfigurationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteConfigurationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listInstancesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getInstanceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deactivateConfigurationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .reactivateConfigurationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .queryConfigurationLicenseUsageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .aggregateUsageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listProductsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getProductSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createConfigurationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Configuration.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateConfigurationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Configuration.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteConfigurationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deactivateConfigurationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Configuration.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .reactivateConfigurationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Configuration.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * 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 listConfigurations. */ + public PagedCallSettings.Builder< + ListConfigurationsRequest, ListConfigurationsResponse, ListConfigurationsPagedResponse> + listConfigurationsSettings() { + return listConfigurationsSettings; + } + + /** Returns the builder for the settings used for calls to getConfiguration. */ + public UnaryCallSettings.Builder + getConfigurationSettings() { + return getConfigurationSettings; + } + + /** Returns the builder for the settings used for calls to createConfiguration. */ + public UnaryCallSettings.Builder + createConfigurationSettings() { + return createConfigurationSettings; + } + + /** Returns the builder for the settings used for calls to createConfiguration. */ + public OperationCallSettings.Builder< + CreateConfigurationRequest, Configuration, OperationMetadata> + createConfigurationOperationSettings() { + return createConfigurationOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateConfiguration. */ + public UnaryCallSettings.Builder + updateConfigurationSettings() { + return updateConfigurationSettings; + } + + /** Returns the builder for the settings used for calls to updateConfiguration. */ + public OperationCallSettings.Builder< + UpdateConfigurationRequest, Configuration, OperationMetadata> + updateConfigurationOperationSettings() { + return updateConfigurationOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteConfiguration. */ + public UnaryCallSettings.Builder + deleteConfigurationSettings() { + return deleteConfigurationSettings; + } + + /** Returns the builder for the settings used for calls to deleteConfiguration. */ + public OperationCallSettings.Builder + deleteConfigurationOperationSettings() { + return deleteConfigurationOperationSettings; + } + + /** Returns the builder for the settings used for calls to listInstances. */ + public PagedCallSettings.Builder< + ListInstancesRequest, ListInstancesResponse, ListInstancesPagedResponse> + listInstancesSettings() { + return listInstancesSettings; + } + + /** Returns the builder for the settings used for calls to getInstance. */ + public UnaryCallSettings.Builder getInstanceSettings() { + return getInstanceSettings; + } + + /** Returns the builder for the settings used for calls to deactivateConfiguration. */ + public UnaryCallSettings.Builder + deactivateConfigurationSettings() { + return deactivateConfigurationSettings; + } + + /** Returns the builder for the settings used for calls to deactivateConfiguration. */ + public OperationCallSettings.Builder< + DeactivateConfigurationRequest, Configuration, OperationMetadata> + deactivateConfigurationOperationSettings() { + return deactivateConfigurationOperationSettings; + } + + /** Returns the builder for the settings used for calls to reactivateConfiguration. */ + public UnaryCallSettings.Builder + reactivateConfigurationSettings() { + return reactivateConfigurationSettings; + } + + /** Returns the builder for the settings used for calls to reactivateConfiguration. */ + public OperationCallSettings.Builder< + ReactivateConfigurationRequest, Configuration, OperationMetadata> + reactivateConfigurationOperationSettings() { + return reactivateConfigurationOperationSettings; + } + + /** Returns the builder for the settings used for calls to queryConfigurationLicenseUsage. */ + public UnaryCallSettings.Builder< + QueryConfigurationLicenseUsageRequest, QueryConfigurationLicenseUsageResponse> + queryConfigurationLicenseUsageSettings() { + return queryConfigurationLicenseUsageSettings; + } + + /** Returns the builder for the settings used for calls to aggregateUsage. */ + public PagedCallSettings.Builder< + AggregateUsageRequest, AggregateUsageResponse, AggregateUsagePagedResponse> + aggregateUsageSettings() { + return aggregateUsageSettings; + } + + /** Returns the builder for the settings used for calls to listProducts. */ + public PagedCallSettings.Builder< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings() { + return listProductsSettings; + } + + /** Returns the builder for the settings used for calls to getProduct. */ + public UnaryCallSettings.Builder getProductSettings() { + return getProductSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public LicenseManagerStubSettings build() throws IOException { + return new LicenseManagerStubSettings(this); + } + } +} diff --git a/java-licensemanager/google-cloud-licensemanager/src/main/resources/META-INF/native-image/com.google.cloud.licensemanager.v1/reflect-config.json b/java-licensemanager/google-cloud-licensemanager/src/main/resources/META-INF/native-image/com.google.cloud.licensemanager.v1/reflect-config.json new file mode 100644 index 000000000000..e5865eef0f0b --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/main/resources/META-INF/native-image/com.google.cloud.licensemanager.v1/reflect-config.json @@ -0,0 +1,2027 @@ +[ + { + "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.FieldInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Format", + "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.api.TypeReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.ActivationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.AggregateUsageRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.AggregateUsageRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.AggregateUsageResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.AggregateUsageResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.BillingInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.BillingInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.Configuration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.Configuration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.Configuration$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.CreateConfigurationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.CreateConfigurationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.DeleteConfigurationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.DeleteConfigurationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.GetConfigurationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.GetConfigurationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.GetInstanceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.GetInstanceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.GetProductRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.GetProductRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.Instance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.Instance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.Instance$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.LicenseType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.ListConfigurationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.ListConfigurationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.ListConfigurationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.ListConfigurationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.ListInstancesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.ListInstancesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.ListInstancesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.ListInstancesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.ListProductsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.ListProductsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.ListProductsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.ListProductsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.Product", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.Product$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.Product$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.UpdateConfigurationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.UpdateConfigurationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.Usage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.Usage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.UserCountBillingInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.UserCountBillingInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.UserCountUsage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.licensemanager.v1.UserCountUsage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.GetLocationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.ListLocationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.location.Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.CancelOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.DeleteOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.GetOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.ListOperationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.Operation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.OperationInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.longrunning.WaitOperationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Any$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$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$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$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$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 + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/LicenseManagerClientHttpJsonTest.java b/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/LicenseManagerClientHttpJsonTest.java new file mode 100644 index 000000000000..0e06a0b91763 --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/LicenseManagerClientHttpJsonTest.java @@ -0,0 +1,1544 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1; + +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.AggregateUsagePagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListConfigurationsPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListInstancesPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListLocationsPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListProductsPagedResponse; + +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.licensemanager.v1.stub.HttpJsonLicenseManagerStub; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class LicenseManagerClientHttpJsonTest { + private static MockHttpService mockService; + private static LicenseManagerClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonLicenseManagerStub.getMethodDescriptors(), + LicenseManagerSettings.getDefaultEndpoint()); + LicenseManagerSettings settings = + LicenseManagerSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + LicenseManagerSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = LicenseManagerClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listConfigurationsTest() throws Exception { + Configuration responsesElement = Configuration.newBuilder().build(); + ListConfigurationsResponse expectedResponse = + ListConfigurationsResponse.newBuilder() + .setNextPageToken("") + .addAllConfigurations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListConfigurationsPagedResponse pagedListResponse = client.listConfigurations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConfigurationsList().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 listConfigurationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listConfigurations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConfigurationsTest2() throws Exception { + Configuration responsesElement = Configuration.newBuilder().build(); + ListConfigurationsResponse expectedResponse = + ListConfigurationsResponse.newBuilder() + .setNextPageToken("") + .addAllConfigurations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListConfigurationsPagedResponse pagedListResponse = client.listConfigurations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConfigurationsList().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 listConfigurationsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listConfigurations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConfigurationTest() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + + Configuration actualResponse = client.getConfiguration(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 getConfigurationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + client.getConfiguration(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConfigurationTest2() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7171/locations/location-7171/configurations/configuration-7171"; + + Configuration actualResponse = client.getConfiguration(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 getConfigurationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7171/locations/location-7171/configurations/configuration-7171"; + client.getConfiguration(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createConfigurationTest() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Configuration configuration = Configuration.newBuilder().build(); + String configurationId = "configurationId1948915889"; + + Configuration actualResponse = + client.createConfigurationAsync(parent, configuration, configurationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createConfigurationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Configuration configuration = Configuration.newBuilder().build(); + String configurationId = "configurationId1948915889"; + client.createConfigurationAsync(parent, configuration, configurationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createConfigurationTest2() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + Configuration configuration = Configuration.newBuilder().build(); + String configurationId = "configurationId1948915889"; + + Configuration actualResponse = + client.createConfigurationAsync(parent, configuration, configurationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createConfigurationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + Configuration configuration = Configuration.newBuilder().build(); + String configurationId = "configurationId1948915889"; + client.createConfigurationAsync(parent, configuration, configurationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateConfigurationTest() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Configuration configuration = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Configuration actualResponse = client.updateConfigurationAsync(configuration, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateConfigurationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Configuration configuration = + Configuration.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateConfigurationAsync(configuration, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteConfigurationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + + client.deleteConfigurationAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteConfigurationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + client.deleteConfigurationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteConfigurationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-7171/locations/location-7171/configurations/configuration-7171"; + + client.deleteConfigurationAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteConfigurationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7171/locations/location-7171/configurations/configuration-7171"; + client.deleteConfigurationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listInstancesTest() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListInstancesPagedResponse pagedListResponse = client.listInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().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 listInstancesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstancesTest2() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListInstancesPagedResponse pagedListResponse = client.listInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().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 listInstancesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setRegion("region-934795532") + .putAllProductActivation(new HashMap()) + .setLicenseVersionId("licenseVersionId748496082") + .setComputeInstance("computeInstance-62629396") + .build(); + mockService.addResponse(expectedResponse); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + Instance actualResponse = client.getInstance(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 getInstanceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setRegion("region-934795532") + .putAllProductActivation(new HashMap()) + .setLicenseVersionId("licenseVersionId748496082") + .setComputeInstance("computeInstance-62629396") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + + Instance actualResponse = client.getInstance(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 getInstanceExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9412/locations/location-9412/instances/instance-9412"; + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deactivateConfigurationTest() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deactivateConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + + Configuration actualResponse = client.deactivateConfigurationAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deactivateConfigurationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + client.deactivateConfigurationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deactivateConfigurationTest2() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deactivateConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-7171/locations/location-7171/configurations/configuration-7171"; + + Configuration actualResponse = client.deactivateConfigurationAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deactivateConfigurationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7171/locations/location-7171/configurations/configuration-7171"; + client.deactivateConfigurationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void reactivateConfigurationTest() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("reactivateConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + + Configuration actualResponse = client.reactivateConfigurationAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void reactivateConfigurationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + client.reactivateConfigurationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void reactivateConfigurationTest2() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("reactivateConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-7171/locations/location-7171/configurations/configuration-7171"; + + Configuration actualResponse = client.reactivateConfigurationAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void reactivateConfigurationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7171/locations/location-7171/configurations/configuration-7171"; + client.reactivateConfigurationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void queryConfigurationLicenseUsageTest() throws Exception { + QueryConfigurationLicenseUsageResponse expectedResponse = + QueryConfigurationLicenseUsageResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + + QueryConfigurationLicenseUsageResponse actualResponse = + client.queryConfigurationLicenseUsage(name, startTime, endTime); + 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 queryConfigurationLicenseUsageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + client.queryConfigurationLicenseUsage(name, startTime, endTime); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void queryConfigurationLicenseUsageTest2() throws Exception { + QueryConfigurationLicenseUsageResponse expectedResponse = + QueryConfigurationLicenseUsageResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7171/locations/location-7171/configurations/configuration-7171"; + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + + QueryConfigurationLicenseUsageResponse actualResponse = + client.queryConfigurationLicenseUsage(name, startTime, endTime); + 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 queryConfigurationLicenseUsageExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7171/locations/location-7171/configurations/configuration-7171"; + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + client.queryConfigurationLicenseUsage(name, startTime, endTime); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void aggregateUsageTest() throws Exception { + Usage responsesElement = Usage.newBuilder().build(); + AggregateUsageResponse expectedResponse = + AggregateUsageResponse.newBuilder() + .setNextPageToken("") + .addAllUsages(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + + AggregateUsagePagedResponse pagedListResponse = client.aggregateUsage(name, startTime, endTime); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUsagesList().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 aggregateUsageExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + client.aggregateUsage(name, startTime, endTime); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void aggregateUsageTest2() throws Exception { + Usage responsesElement = Usage.newBuilder().build(); + AggregateUsageResponse expectedResponse = + AggregateUsageResponse.newBuilder() + .setNextPageToken("") + .addAllUsages(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7171/locations/location-7171/configurations/configuration-7171"; + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + + AggregateUsagePagedResponse pagedListResponse = client.aggregateUsage(name, startTime, endTime); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUsagesList().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 aggregateUsageExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7171/locations/location-7171/configurations/configuration-7171"; + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + client.aggregateUsage(name, startTime, endTime); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProductsPagedResponse pagedListResponse = client.listProducts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().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 listProductsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProducts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest2() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListProductsPagedResponse pagedListResponse = client.listProducts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().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 listProductsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listProducts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setVersion("version351608024") + .setProductCompany("productCompany816671886") + .setSku("sku113949") + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .build(); + mockService.addResponse(expectedResponse); + + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + Product actualResponse = client.getProduct(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 getProductExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.getProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductTest2() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setVersion("version351608024") + .setProductCompany("productCompany816671886") + .setSku("sku113949") + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-4324/locations/location-4324/products/product-4324"; + + Product actualResponse = client.getProduct(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 getProductExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-4324/locations/location-4324/products/product-4324"; + client.getProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().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 listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(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 getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/LicenseManagerClientTest.java b/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/LicenseManagerClientTest.java new file mode 100644 index 000000000000..f0567af83500 --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/LicenseManagerClientTest.java @@ -0,0 +1,1403 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1; + +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.AggregateUsagePagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListConfigurationsPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListInstancesPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListLocationsPagedResponse; +import static com.google.cloud.licensemanager.v1.LicenseManagerClient.ListProductsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class LicenseManagerClientTest { + private static MockLicenseManager mockLicenseManager; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private LicenseManagerClient client; + + @BeforeClass + public static void startStaticServer() { + mockLicenseManager = new MockLicenseManager(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockLicenseManager, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + LicenseManagerSettings settings = + LicenseManagerSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = LicenseManagerClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listConfigurationsTest() throws Exception { + Configuration responsesElement = Configuration.newBuilder().build(); + ListConfigurationsResponse expectedResponse = + ListConfigurationsResponse.newBuilder() + .setNextPageToken("") + .addAllConfigurations(Arrays.asList(responsesElement)) + .build(); + mockLicenseManager.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListConfigurationsPagedResponse pagedListResponse = client.listConfigurations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConfigurationsList().get(0), resources.get(0)); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListConfigurationsRequest actualRequest = ((ListConfigurationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listConfigurationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listConfigurations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listConfigurationsTest2() throws Exception { + Configuration responsesElement = Configuration.newBuilder().build(); + ListConfigurationsResponse expectedResponse = + ListConfigurationsResponse.newBuilder() + .setNextPageToken("") + .addAllConfigurations(Arrays.asList(responsesElement)) + .build(); + mockLicenseManager.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListConfigurationsPagedResponse pagedListResponse = client.listConfigurations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getConfigurationsList().get(0), resources.get(0)); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListConfigurationsRequest actualRequest = ((ListConfigurationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listConfigurationsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + String parent = "parent-995424086"; + client.listConfigurations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConfigurationTest() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockLicenseManager.addResponse(expectedResponse); + + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + + Configuration actualResponse = client.getConfiguration(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetConfigurationRequest actualRequest = ((GetConfigurationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getConfigurationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + client.getConfiguration(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getConfigurationTest2() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockLicenseManager.addResponse(expectedResponse); + + String name = "name3373707"; + + Configuration actualResponse = client.getConfiguration(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetConfigurationRequest actualRequest = ((GetConfigurationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getConfigurationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + String name = "name3373707"; + client.getConfiguration(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createConfigurationTest() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLicenseManager.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Configuration configuration = Configuration.newBuilder().build(); + String configurationId = "configurationId1948915889"; + + Configuration actualResponse = + client.createConfigurationAsync(parent, configuration, configurationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateConfigurationRequest actualRequest = ((CreateConfigurationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(configuration, actualRequest.getConfiguration()); + Assert.assertEquals(configurationId, actualRequest.getConfigurationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createConfigurationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Configuration configuration = Configuration.newBuilder().build(); + String configurationId = "configurationId1948915889"; + client.createConfigurationAsync(parent, configuration, configurationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createConfigurationTest2() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLicenseManager.addResponse(resultOperation); + + String parent = "parent-995424086"; + Configuration configuration = Configuration.newBuilder().build(); + String configurationId = "configurationId1948915889"; + + Configuration actualResponse = + client.createConfigurationAsync(parent, configuration, configurationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateConfigurationRequest actualRequest = ((CreateConfigurationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(configuration, actualRequest.getConfiguration()); + Assert.assertEquals(configurationId, actualRequest.getConfigurationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createConfigurationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + String parent = "parent-995424086"; + Configuration configuration = Configuration.newBuilder().build(); + String configurationId = "configurationId1948915889"; + client.createConfigurationAsync(parent, configuration, configurationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateConfigurationTest() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLicenseManager.addResponse(resultOperation); + + Configuration configuration = Configuration.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Configuration actualResponse = client.updateConfigurationAsync(configuration, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateConfigurationRequest actualRequest = ((UpdateConfigurationRequest) actualRequests.get(0)); + + Assert.assertEquals(configuration, actualRequest.getConfiguration()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateConfigurationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + Configuration configuration = Configuration.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateConfigurationAsync(configuration, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteConfigurationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLicenseManager.addResponse(resultOperation); + + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + + client.deleteConfigurationAsync(name).get(); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteConfigurationRequest actualRequest = ((DeleteConfigurationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteConfigurationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + client.deleteConfigurationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteConfigurationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLicenseManager.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteConfigurationAsync(name).get(); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteConfigurationRequest actualRequest = ((DeleteConfigurationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteConfigurationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + String name = "name3373707"; + client.deleteConfigurationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listInstancesTest() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockLicenseManager.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListInstancesPagedResponse pagedListResponse = client.listInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().get(0), resources.get(0)); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstancesRequest actualRequest = ((ListInstancesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInstancesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInstancesTest2() throws Exception { + Instance responsesElement = Instance.newBuilder().build(); + ListInstancesResponse expectedResponse = + ListInstancesResponse.newBuilder() + .setNextPageToken("") + .addAllInstances(Arrays.asList(responsesElement)) + .build(); + mockLicenseManager.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListInstancesPagedResponse pagedListResponse = client.listInstances(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstancesList().get(0), resources.get(0)); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstancesRequest actualRequest = ((ListInstancesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInstancesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + String parent = "parent-995424086"; + client.listInstances(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setRegion("region-934795532") + .putAllProductActivation(new HashMap()) + .setLicenseVersionId("licenseVersionId748496082") + .setComputeInstance("computeInstance-62629396") + .build(); + mockLicenseManager.addResponse(expectedResponse); + + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + Instance actualResponse = client.getInstance(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstanceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInstanceTest2() throws Exception { + Instance expectedResponse = + Instance.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setRegion("region-934795532") + .putAllProductActivation(new HashMap()) + .setLicenseVersionId("licenseVersionId748496082") + .setComputeInstance("computeInstance-62629396") + .build(); + mockLicenseManager.addResponse(expectedResponse); + + String name = "name3373707"; + + Instance actualResponse = client.getInstance(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstanceRequest actualRequest = ((GetInstanceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInstanceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + String name = "name3373707"; + client.getInstance(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deactivateConfigurationTest() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deactivateConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLicenseManager.addResponse(resultOperation); + + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + + Configuration actualResponse = client.deactivateConfigurationAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeactivateConfigurationRequest actualRequest = + ((DeactivateConfigurationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deactivateConfigurationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + client.deactivateConfigurationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deactivateConfigurationTest2() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deactivateConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLicenseManager.addResponse(resultOperation); + + String name = "name3373707"; + + Configuration actualResponse = client.deactivateConfigurationAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeactivateConfigurationRequest actualRequest = + ((DeactivateConfigurationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deactivateConfigurationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + String name = "name3373707"; + client.deactivateConfigurationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void reactivateConfigurationTest() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("reactivateConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLicenseManager.addResponse(resultOperation); + + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + + Configuration actualResponse = client.reactivateConfigurationAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ReactivateConfigurationRequest actualRequest = + ((ReactivateConfigurationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void reactivateConfigurationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + client.reactivateConfigurationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void reactivateConfigurationTest2() throws Exception { + Configuration expectedResponse = + Configuration.newBuilder() + .setName(ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setDisplayName("displayName1714148973") + .setProduct(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setLicenseType(LicenseType.forNumber(0)) + .setCurrentBillingInfo(BillingInfo.newBuilder().build()) + .setNextBillingInfo(BillingInfo.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("reactivateConfigurationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockLicenseManager.addResponse(resultOperation); + + String name = "name3373707"; + + Configuration actualResponse = client.reactivateConfigurationAsync(name).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ReactivateConfigurationRequest actualRequest = + ((ReactivateConfigurationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void reactivateConfigurationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + String name = "name3373707"; + client.reactivateConfigurationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void queryConfigurationLicenseUsageTest() throws Exception { + QueryConfigurationLicenseUsageResponse expectedResponse = + QueryConfigurationLicenseUsageResponse.newBuilder().build(); + mockLicenseManager.addResponse(expectedResponse); + + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + + QueryConfigurationLicenseUsageResponse actualResponse = + client.queryConfigurationLicenseUsage(name, startTime, endTime); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + QueryConfigurationLicenseUsageRequest actualRequest = + ((QueryConfigurationLicenseUsageRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(startTime, actualRequest.getStartTime()); + Assert.assertEquals(endTime, actualRequest.getEndTime()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void queryConfigurationLicenseUsageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + client.queryConfigurationLicenseUsage(name, startTime, endTime); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void queryConfigurationLicenseUsageTest2() throws Exception { + QueryConfigurationLicenseUsageResponse expectedResponse = + QueryConfigurationLicenseUsageResponse.newBuilder().build(); + mockLicenseManager.addResponse(expectedResponse); + + String name = "name3373707"; + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + + QueryConfigurationLicenseUsageResponse actualResponse = + client.queryConfigurationLicenseUsage(name, startTime, endTime); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + QueryConfigurationLicenseUsageRequest actualRequest = + ((QueryConfigurationLicenseUsageRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(startTime, actualRequest.getStartTime()); + Assert.assertEquals(endTime, actualRequest.getEndTime()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void queryConfigurationLicenseUsageExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + String name = "name3373707"; + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + client.queryConfigurationLicenseUsage(name, startTime, endTime); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void aggregateUsageTest() throws Exception { + Usage responsesElement = Usage.newBuilder().build(); + AggregateUsageResponse expectedResponse = + AggregateUsageResponse.newBuilder() + .setNextPageToken("") + .addAllUsages(Arrays.asList(responsesElement)) + .build(); + mockLicenseManager.addResponse(expectedResponse); + + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + + AggregateUsagePagedResponse pagedListResponse = client.aggregateUsage(name, startTime, endTime); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUsagesList().get(0), resources.get(0)); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AggregateUsageRequest actualRequest = ((AggregateUsageRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(startTime, actualRequest.getStartTime()); + Assert.assertEquals(endTime, actualRequest.getEndTime()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void aggregateUsageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + client.aggregateUsage(name, startTime, endTime); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void aggregateUsageTest2() throws Exception { + Usage responsesElement = Usage.newBuilder().build(); + AggregateUsageResponse expectedResponse = + AggregateUsageResponse.newBuilder() + .setNextPageToken("") + .addAllUsages(Arrays.asList(responsesElement)) + .build(); + mockLicenseManager.addResponse(expectedResponse); + + String name = "name3373707"; + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + + AggregateUsagePagedResponse pagedListResponse = client.aggregateUsage(name, startTime, endTime); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUsagesList().get(0), resources.get(0)); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AggregateUsageRequest actualRequest = ((AggregateUsageRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(startTime, actualRequest.getStartTime()); + Assert.assertEquals(endTime, actualRequest.getEndTime()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void aggregateUsageExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + String name = "name3373707"; + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + client.aggregateUsage(name, startTime, endTime); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockLicenseManager.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListProductsPagedResponse pagedListResponse = client.listProducts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductsRequest actualRequest = ((ListProductsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listProducts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest2() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockLicenseManager.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListProductsPagedResponse pagedListResponse = client.listProducts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductsRequest actualRequest = ((ListProductsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + String parent = "parent-995424086"; + client.listProducts(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductTest() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setVersion("version351608024") + .setProductCompany("productCompany816671886") + .setSku("sku113949") + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .build(); + mockLicenseManager.addResponse(expectedResponse); + + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + + Product actualResponse = client.getProduct(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductRequest actualRequest = ((GetProductRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + client.getProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductTest2() throws Exception { + Product expectedResponse = + Product.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .setVersion("version351608024") + .setProductCompany("productCompany816671886") + .setSku("sku113949") + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .build(); + mockLicenseManager.addResponse(expectedResponse); + + String name = "name3373707"; + + Product actualResponse = client.getProduct(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductRequest actualRequest = ((GetProductRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseManager.addException(exception); + + try { + String name = "name3373707"; + client.getProduct(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + 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 listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/MockLicenseManager.java b/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/MockLicenseManager.java new file mode 100644 index 000000000000..335ccc196ffd --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/MockLicenseManager.java @@ -0,0 +1,59 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.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 MockLicenseManager implements MockGrpcService { + private final MockLicenseManagerImpl serviceImpl; + + public MockLicenseManager() { + serviceImpl = new MockLicenseManagerImpl(); + } + + @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-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/MockLicenseManagerImpl.java b/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/MockLicenseManagerImpl.java new file mode 100644 index 000000000000..ddc1f0c3a2fb --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/MockLicenseManagerImpl.java @@ -0,0 +1,337 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.licensemanager.v1.LicenseManagerGrpc.LicenseManagerImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLicenseManagerImpl extends LicenseManagerImplBase { + private List requests; + private Queue responses; + + public MockLicenseManagerImpl() { + 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 listConfigurations( + ListConfigurationsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListConfigurationsResponse) { + requests.add(request); + responseObserver.onNext(((ListConfigurationsResponse) 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 ListConfigurations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListConfigurationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getConfiguration( + GetConfigurationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Configuration) { + requests.add(request); + responseObserver.onNext(((Configuration) 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 GetConfiguration, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Configuration.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createConfiguration( + CreateConfigurationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateConfiguration, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateConfiguration( + UpdateConfigurationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateConfiguration, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteConfiguration( + DeleteConfigurationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteConfiguration, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listInstances( + ListInstancesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListInstancesResponse) { + requests.add(request); + responseObserver.onNext(((ListInstancesResponse) 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 ListInstances, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListInstancesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getInstance(GetInstanceRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Instance) { + requests.add(request); + responseObserver.onNext(((Instance) 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 GetInstance, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Instance.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deactivateConfiguration( + DeactivateConfigurationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeactivateConfiguration, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void reactivateConfiguration( + ReactivateConfigurationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ReactivateConfiguration, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void queryConfigurationLicenseUsage( + QueryConfigurationLicenseUsageRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof QueryConfigurationLicenseUsageResponse) { + requests.add(request); + responseObserver.onNext(((QueryConfigurationLicenseUsageResponse) 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 QueryConfigurationLicenseUsage," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + QueryConfigurationLicenseUsageResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void aggregateUsage( + AggregateUsageRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AggregateUsageResponse) { + requests.add(request); + responseObserver.onNext(((AggregateUsageResponse) 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 AggregateUsage, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AggregateUsageResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listProducts( + ListProductsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListProductsResponse) { + requests.add(request); + responseObserver.onNext(((ListProductsResponse) 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 ListProducts, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListProductsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getProduct(GetProductRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Product) { + requests.add(request); + responseObserver.onNext(((Product) 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 GetProduct, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Product.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/MockLocations.java b/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/MockLocations.java new file mode 100644 index 000000000000..76cab2ae6770 --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.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 MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/MockLocationsImpl.java b/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/MockLocationsImpl.java new file mode 100644 index 000000000000..861dd471f108 --- /dev/null +++ b/java-licensemanager/google-cloud-licensemanager/src/test/java/com/google/cloud/licensemanager/v1/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +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 MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) 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 ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) 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 GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-licensemanager/grpc-google-cloud-licensemanager-v1/pom.xml b/java-licensemanager/grpc-google-cloud-licensemanager-v1/pom.xml new file mode 100644 index 000000000000..faa9019ca6a9 --- /dev/null +++ b/java-licensemanager/grpc-google-cloud-licensemanager-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-licensemanager-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-licensemanager-v1 + GRPC library for google-cloud-licensemanager + + com.google.cloud + google-cloud-licensemanager-parent + 0.0.1-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-licensemanager-v1 + + + com.google.guava + guava + + + diff --git a/java-licensemanager/grpc-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/LicenseManagerGrpc.java b/java-licensemanager/grpc-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/LicenseManagerGrpc.java new file mode 100644 index 000000000000..164c909a497d --- /dev/null +++ b/java-licensemanager/grpc-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/LicenseManagerGrpc.java @@ -0,0 +1,2023 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.licensemanager.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service describing handlers for resources
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/licensemanager/v1/licensemanager.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class LicenseManagerGrpc { + + private LicenseManagerGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.licensemanager.v1.LicenseManager"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.ListConfigurationsRequest, + com.google.cloud.licensemanager.v1.ListConfigurationsResponse> + getListConfigurationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListConfigurations", + requestType = com.google.cloud.licensemanager.v1.ListConfigurationsRequest.class, + responseType = com.google.cloud.licensemanager.v1.ListConfigurationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.ListConfigurationsRequest, + com.google.cloud.licensemanager.v1.ListConfigurationsResponse> + getListConfigurationsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.ListConfigurationsRequest, + com.google.cloud.licensemanager.v1.ListConfigurationsResponse> + getListConfigurationsMethod; + if ((getListConfigurationsMethod = LicenseManagerGrpc.getListConfigurationsMethod) == null) { + synchronized (LicenseManagerGrpc.class) { + if ((getListConfigurationsMethod = LicenseManagerGrpc.getListConfigurationsMethod) + == null) { + LicenseManagerGrpc.getListConfigurationsMethod = + getListConfigurationsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListConfigurations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.ListConfigurationsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.ListConfigurationsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new LicenseManagerMethodDescriptorSupplier("ListConfigurations")) + .build(); + } + } + } + return getListConfigurationsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.GetConfigurationRequest, + com.google.cloud.licensemanager.v1.Configuration> + getGetConfigurationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetConfiguration", + requestType = com.google.cloud.licensemanager.v1.GetConfigurationRequest.class, + responseType = com.google.cloud.licensemanager.v1.Configuration.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.GetConfigurationRequest, + com.google.cloud.licensemanager.v1.Configuration> + getGetConfigurationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.GetConfigurationRequest, + com.google.cloud.licensemanager.v1.Configuration> + getGetConfigurationMethod; + if ((getGetConfigurationMethod = LicenseManagerGrpc.getGetConfigurationMethod) == null) { + synchronized (LicenseManagerGrpc.class) { + if ((getGetConfigurationMethod = LicenseManagerGrpc.getGetConfigurationMethod) == null) { + LicenseManagerGrpc.getGetConfigurationMethod = + getGetConfigurationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetConfiguration")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.GetConfigurationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.Configuration + .getDefaultInstance())) + .setSchemaDescriptor( + new LicenseManagerMethodDescriptorSupplier("GetConfiguration")) + .build(); + } + } + } + return getGetConfigurationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.CreateConfigurationRequest, + com.google.longrunning.Operation> + getCreateConfigurationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateConfiguration", + requestType = com.google.cloud.licensemanager.v1.CreateConfigurationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.CreateConfigurationRequest, + com.google.longrunning.Operation> + getCreateConfigurationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.CreateConfigurationRequest, + com.google.longrunning.Operation> + getCreateConfigurationMethod; + if ((getCreateConfigurationMethod = LicenseManagerGrpc.getCreateConfigurationMethod) == null) { + synchronized (LicenseManagerGrpc.class) { + if ((getCreateConfigurationMethod = LicenseManagerGrpc.getCreateConfigurationMethod) + == null) { + LicenseManagerGrpc.getCreateConfigurationMethod = + getCreateConfigurationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateConfiguration")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.CreateConfigurationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new LicenseManagerMethodDescriptorSupplier("CreateConfiguration")) + .build(); + } + } + } + return getCreateConfigurationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest, + com.google.longrunning.Operation> + getUpdateConfigurationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateConfiguration", + requestType = com.google.cloud.licensemanager.v1.UpdateConfigurationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest, + com.google.longrunning.Operation> + getUpdateConfigurationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest, + com.google.longrunning.Operation> + getUpdateConfigurationMethod; + if ((getUpdateConfigurationMethod = LicenseManagerGrpc.getUpdateConfigurationMethod) == null) { + synchronized (LicenseManagerGrpc.class) { + if ((getUpdateConfigurationMethod = LicenseManagerGrpc.getUpdateConfigurationMethod) + == null) { + LicenseManagerGrpc.getUpdateConfigurationMethod = + getUpdateConfigurationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateConfiguration")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new LicenseManagerMethodDescriptorSupplier("UpdateConfiguration")) + .build(); + } + } + } + return getUpdateConfigurationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest, + com.google.longrunning.Operation> + getDeleteConfigurationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteConfiguration", + requestType = com.google.cloud.licensemanager.v1.DeleteConfigurationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest, + com.google.longrunning.Operation> + getDeleteConfigurationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest, + com.google.longrunning.Operation> + getDeleteConfigurationMethod; + if ((getDeleteConfigurationMethod = LicenseManagerGrpc.getDeleteConfigurationMethod) == null) { + synchronized (LicenseManagerGrpc.class) { + if ((getDeleteConfigurationMethod = LicenseManagerGrpc.getDeleteConfigurationMethod) + == null) { + LicenseManagerGrpc.getDeleteConfigurationMethod = + getDeleteConfigurationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteConfiguration")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new LicenseManagerMethodDescriptorSupplier("DeleteConfiguration")) + .build(); + } + } + } + return getDeleteConfigurationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.ListInstancesRequest, + com.google.cloud.licensemanager.v1.ListInstancesResponse> + getListInstancesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListInstances", + requestType = com.google.cloud.licensemanager.v1.ListInstancesRequest.class, + responseType = com.google.cloud.licensemanager.v1.ListInstancesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.ListInstancesRequest, + com.google.cloud.licensemanager.v1.ListInstancesResponse> + getListInstancesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.ListInstancesRequest, + com.google.cloud.licensemanager.v1.ListInstancesResponse> + getListInstancesMethod; + if ((getListInstancesMethod = LicenseManagerGrpc.getListInstancesMethod) == null) { + synchronized (LicenseManagerGrpc.class) { + if ((getListInstancesMethod = LicenseManagerGrpc.getListInstancesMethod) == null) { + LicenseManagerGrpc.getListInstancesMethod = + getListInstancesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInstances")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.ListInstancesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.ListInstancesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new LicenseManagerMethodDescriptorSupplier("ListInstances")) + .build(); + } + } + } + return getListInstancesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.GetInstanceRequest, + com.google.cloud.licensemanager.v1.Instance> + getGetInstanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetInstance", + requestType = com.google.cloud.licensemanager.v1.GetInstanceRequest.class, + responseType = com.google.cloud.licensemanager.v1.Instance.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.GetInstanceRequest, + com.google.cloud.licensemanager.v1.Instance> + getGetInstanceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.GetInstanceRequest, + com.google.cloud.licensemanager.v1.Instance> + getGetInstanceMethod; + if ((getGetInstanceMethod = LicenseManagerGrpc.getGetInstanceMethod) == null) { + synchronized (LicenseManagerGrpc.class) { + if ((getGetInstanceMethod = LicenseManagerGrpc.getGetInstanceMethod) == null) { + LicenseManagerGrpc.getGetInstanceMethod = + getGetInstanceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.GetInstanceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.Instance.getDefaultInstance())) + .setSchemaDescriptor( + new LicenseManagerMethodDescriptorSupplier("GetInstance")) + .build(); + } + } + } + return getGetInstanceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest, + com.google.longrunning.Operation> + getDeactivateConfigurationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeactivateConfiguration", + requestType = com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest, + com.google.longrunning.Operation> + getDeactivateConfigurationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest, + com.google.longrunning.Operation> + getDeactivateConfigurationMethod; + if ((getDeactivateConfigurationMethod = LicenseManagerGrpc.getDeactivateConfigurationMethod) + == null) { + synchronized (LicenseManagerGrpc.class) { + if ((getDeactivateConfigurationMethod = LicenseManagerGrpc.getDeactivateConfigurationMethod) + == null) { + LicenseManagerGrpc.getDeactivateConfigurationMethod = + getDeactivateConfigurationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeactivateConfiguration")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new LicenseManagerMethodDescriptorSupplier("DeactivateConfiguration")) + .build(); + } + } + } + return getDeactivateConfigurationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest, + com.google.longrunning.Operation> + getReactivateConfigurationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReactivateConfiguration", + requestType = com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest, + com.google.longrunning.Operation> + getReactivateConfigurationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest, + com.google.longrunning.Operation> + getReactivateConfigurationMethod; + if ((getReactivateConfigurationMethod = LicenseManagerGrpc.getReactivateConfigurationMethod) + == null) { + synchronized (LicenseManagerGrpc.class) { + if ((getReactivateConfigurationMethod = LicenseManagerGrpc.getReactivateConfigurationMethod) + == null) { + LicenseManagerGrpc.getReactivateConfigurationMethod = + getReactivateConfigurationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ReactivateConfiguration")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new LicenseManagerMethodDescriptorSupplier("ReactivateConfiguration")) + .build(); + } + } + } + return getReactivateConfigurationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest, + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse> + getQueryConfigurationLicenseUsageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "QueryConfigurationLicenseUsage", + requestType = com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest.class, + responseType = + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest, + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse> + getQueryConfigurationLicenseUsageMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest, + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse> + getQueryConfigurationLicenseUsageMethod; + if ((getQueryConfigurationLicenseUsageMethod = + LicenseManagerGrpc.getQueryConfigurationLicenseUsageMethod) + == null) { + synchronized (LicenseManagerGrpc.class) { + if ((getQueryConfigurationLicenseUsageMethod = + LicenseManagerGrpc.getQueryConfigurationLicenseUsageMethod) + == null) { + LicenseManagerGrpc.getQueryConfigurationLicenseUsageMethod = + getQueryConfigurationLicenseUsageMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "QueryConfigurationLicenseUsage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1 + .QueryConfigurationLicenseUsageRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1 + .QueryConfigurationLicenseUsageResponse.getDefaultInstance())) + .setSchemaDescriptor( + new LicenseManagerMethodDescriptorSupplier( + "QueryConfigurationLicenseUsage")) + .build(); + } + } + } + return getQueryConfigurationLicenseUsageMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.AggregateUsageRequest, + com.google.cloud.licensemanager.v1.AggregateUsageResponse> + getAggregateUsageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AggregateUsage", + requestType = com.google.cloud.licensemanager.v1.AggregateUsageRequest.class, + responseType = com.google.cloud.licensemanager.v1.AggregateUsageResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.AggregateUsageRequest, + com.google.cloud.licensemanager.v1.AggregateUsageResponse> + getAggregateUsageMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.AggregateUsageRequest, + com.google.cloud.licensemanager.v1.AggregateUsageResponse> + getAggregateUsageMethod; + if ((getAggregateUsageMethod = LicenseManagerGrpc.getAggregateUsageMethod) == null) { + synchronized (LicenseManagerGrpc.class) { + if ((getAggregateUsageMethod = LicenseManagerGrpc.getAggregateUsageMethod) == null) { + LicenseManagerGrpc.getAggregateUsageMethod = + getAggregateUsageMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AggregateUsage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.AggregateUsageRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.AggregateUsageResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new LicenseManagerMethodDescriptorSupplier("AggregateUsage")) + .build(); + } + } + } + return getAggregateUsageMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.ListProductsRequest, + com.google.cloud.licensemanager.v1.ListProductsResponse> + getListProductsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProducts", + requestType = com.google.cloud.licensemanager.v1.ListProductsRequest.class, + responseType = com.google.cloud.licensemanager.v1.ListProductsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.ListProductsRequest, + com.google.cloud.licensemanager.v1.ListProductsResponse> + getListProductsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.ListProductsRequest, + com.google.cloud.licensemanager.v1.ListProductsResponse> + getListProductsMethod; + if ((getListProductsMethod = LicenseManagerGrpc.getListProductsMethod) == null) { + synchronized (LicenseManagerGrpc.class) { + if ((getListProductsMethod = LicenseManagerGrpc.getListProductsMethod) == null) { + LicenseManagerGrpc.getListProductsMethod = + getListProductsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProducts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.ListProductsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.ListProductsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new LicenseManagerMethodDescriptorSupplier("ListProducts")) + .build(); + } + } + } + return getListProductsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.GetProductRequest, + com.google.cloud.licensemanager.v1.Product> + getGetProductMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProduct", + requestType = com.google.cloud.licensemanager.v1.GetProductRequest.class, + responseType = com.google.cloud.licensemanager.v1.Product.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.GetProductRequest, + com.google.cloud.licensemanager.v1.Product> + getGetProductMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.licensemanager.v1.GetProductRequest, + com.google.cloud.licensemanager.v1.Product> + getGetProductMethod; + if ((getGetProductMethod = LicenseManagerGrpc.getGetProductMethod) == null) { + synchronized (LicenseManagerGrpc.class) { + if ((getGetProductMethod = LicenseManagerGrpc.getGetProductMethod) == null) { + LicenseManagerGrpc.getGetProductMethod = + getGetProductMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProduct")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.GetProductRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.licensemanager.v1.Product.getDefaultInstance())) + .setSchemaDescriptor(new LicenseManagerMethodDescriptorSupplier("GetProduct")) + .build(); + } + } + } + return getGetProductMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static LicenseManagerStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LicenseManagerStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LicenseManagerStub(channel, callOptions); + } + }; + return LicenseManagerStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static LicenseManagerBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LicenseManagerBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LicenseManagerBlockingV2Stub(channel, callOptions); + } + }; + return LicenseManagerBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static LicenseManagerBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LicenseManagerBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LicenseManagerBlockingStub(channel, callOptions); + } + }; + return LicenseManagerBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static LicenseManagerFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LicenseManagerFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LicenseManagerFutureStub(channel, callOptions); + } + }; + return LicenseManagerFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists Configurations in a given project and location.
+     * 
+ */ + default void listConfigurations( + com.google.cloud.licensemanager.v1.ListConfigurationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListConfigurationsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Configuration.
+     * 
+ */ + default void getConfiguration( + com.google.cloud.licensemanager.v1.GetConfigurationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetConfigurationMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Configuration in a given project and location.
+     * 
+ */ + default void createConfiguration( + com.google.cloud.licensemanager.v1.CreateConfigurationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateConfigurationMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Configuration.
+     * 
+ */ + default void updateConfiguration( + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateConfigurationMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Configuration.
+     * 
+ */ + default void deleteConfiguration( + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteConfigurationMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Instances in a given project and location.
+     * 
+ */ + default void listInstances( + com.google.cloud.licensemanager.v1.ListInstancesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListInstancesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Instance.
+     * 
+ */ + default void getInstance( + com.google.cloud.licensemanager.v1.GetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetInstanceMethod(), responseObserver); + } + + /** + * + * + *
+     * Deactivates the given configuration.
+     * 
+ */ + default void deactivateConfiguration( + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeactivateConfigurationMethod(), responseObserver); + } + + /** + * + * + *
+     * Reactivates the given configuration.
+     * 
+ */ + default void reactivateConfiguration( + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getReactivateConfigurationMethod(), responseObserver); + } + + /** + * + * + *
+     * License Usage information for a Configuration.
+     * 
+ */ + default void queryConfigurationLicenseUsage( + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getQueryConfigurationLicenseUsageMethod(), responseObserver); + } + + /** + * + * + *
+     * Aggregates Usage per Instance for a Configuration.
+     * 
+ */ + default void aggregateUsage( + com.google.cloud.licensemanager.v1.AggregateUsageRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAggregateUsageMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Products in a given project and location.
+     * 
+ */ + default void listProducts( + com.google.cloud.licensemanager.v1.ListProductsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListProductsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Product.
+     * 
+ */ + default void getProduct( + com.google.cloud.licensemanager.v1.GetProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetProductMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service LicenseManager. + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public abstract static class LicenseManagerImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return LicenseManagerGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service LicenseManager. + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public static final class LicenseManagerStub + extends io.grpc.stub.AbstractAsyncStub { + private LicenseManagerStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LicenseManagerStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LicenseManagerStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Configurations in a given project and location.
+     * 
+ */ + public void listConfigurations( + com.google.cloud.licensemanager.v1.ListConfigurationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListConfigurationsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Configuration.
+     * 
+ */ + public void getConfiguration( + com.google.cloud.licensemanager.v1.GetConfigurationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetConfigurationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new Configuration in a given project and location.
+     * 
+ */ + public void createConfiguration( + com.google.cloud.licensemanager.v1.CreateConfigurationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateConfigurationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Configuration.
+     * 
+ */ + public void updateConfiguration( + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateConfigurationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Configuration.
+     * 
+ */ + public void deleteConfiguration( + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteConfigurationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Instances in a given project and location.
+     * 
+ */ + public void listInstances( + com.google.cloud.licensemanager.v1.ListInstancesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListInstancesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Instance.
+     * 
+ */ + public void getInstance( + com.google.cloud.licensemanager.v1.GetInstanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deactivates the given configuration.
+     * 
+ */ + public void deactivateConfiguration( + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeactivateConfigurationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Reactivates the given configuration.
+     * 
+ */ + public void reactivateConfiguration( + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getReactivateConfigurationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * License Usage information for a Configuration.
+     * 
+ */ + public void queryConfigurationLicenseUsage( + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getQueryConfigurationLicenseUsageMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Aggregates Usage per Instance for a Configuration.
+     * 
+ */ + public void aggregateUsage( + com.google.cloud.licensemanager.v1.AggregateUsageRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAggregateUsageMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Products in a given project and location.
+     * 
+ */ + public void listProducts( + com.google.cloud.licensemanager.v1.ListProductsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListProductsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Product.
+     * 
+ */ + public void getProduct( + com.google.cloud.licensemanager.v1.GetProductRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetProductMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service LicenseManager. + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public static final class LicenseManagerBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private LicenseManagerBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LicenseManagerBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LicenseManagerBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Configurations in a given project and location.
+     * 
+ */ + public com.google.cloud.licensemanager.v1.ListConfigurationsResponse listConfigurations( + com.google.cloud.licensemanager.v1.ListConfigurationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListConfigurationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Configuration.
+     * 
+ */ + public com.google.cloud.licensemanager.v1.Configuration getConfiguration( + com.google.cloud.licensemanager.v1.GetConfigurationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetConfigurationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Configuration in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createConfiguration( + com.google.cloud.licensemanager.v1.CreateConfigurationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateConfigurationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Configuration.
+     * 
+ */ + public com.google.longrunning.Operation updateConfiguration( + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateConfigurationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Configuration.
+     * 
+ */ + public com.google.longrunning.Operation deleteConfiguration( + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteConfigurationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Instances in a given project and location.
+     * 
+ */ + public com.google.cloud.licensemanager.v1.ListInstancesResponse listInstances( + com.google.cloud.licensemanager.v1.ListInstancesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInstancesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Instance.
+     * 
+ */ + public com.google.cloud.licensemanager.v1.Instance getInstance( + com.google.cloud.licensemanager.v1.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deactivates the given configuration.
+     * 
+ */ + public com.google.longrunning.Operation deactivateConfiguration( + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeactivateConfigurationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Reactivates the given configuration.
+     * 
+ */ + public com.google.longrunning.Operation reactivateConfiguration( + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReactivateConfigurationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * License Usage information for a Configuration.
+     * 
+ */ + public com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + queryConfigurationLicenseUsage( + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getQueryConfigurationLicenseUsageMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Aggregates Usage per Instance for a Configuration.
+     * 
+ */ + public com.google.cloud.licensemanager.v1.AggregateUsageResponse aggregateUsage( + com.google.cloud.licensemanager.v1.AggregateUsageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAggregateUsageMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Products in a given project and location.
+     * 
+ */ + public com.google.cloud.licensemanager.v1.ListProductsResponse listProducts( + com.google.cloud.licensemanager.v1.ListProductsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProductsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Product.
+     * 
+ */ + public com.google.cloud.licensemanager.v1.Product getProduct( + com.google.cloud.licensemanager.v1.GetProductRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProductMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service LicenseManager. + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public static final class LicenseManagerBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private LicenseManagerBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LicenseManagerBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LicenseManagerBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Configurations in a given project and location.
+     * 
+ */ + public com.google.cloud.licensemanager.v1.ListConfigurationsResponse listConfigurations( + com.google.cloud.licensemanager.v1.ListConfigurationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListConfigurationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Configuration.
+     * 
+ */ + public com.google.cloud.licensemanager.v1.Configuration getConfiguration( + com.google.cloud.licensemanager.v1.GetConfigurationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetConfigurationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Configuration in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createConfiguration( + com.google.cloud.licensemanager.v1.CreateConfigurationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateConfigurationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Configuration.
+     * 
+ */ + public com.google.longrunning.Operation updateConfiguration( + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateConfigurationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Configuration.
+     * 
+ */ + public com.google.longrunning.Operation deleteConfiguration( + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteConfigurationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Instances in a given project and location.
+     * 
+ */ + public com.google.cloud.licensemanager.v1.ListInstancesResponse listInstances( + com.google.cloud.licensemanager.v1.ListInstancesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInstancesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Instance.
+     * 
+ */ + public com.google.cloud.licensemanager.v1.Instance getInstance( + com.google.cloud.licensemanager.v1.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInstanceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deactivates the given configuration.
+     * 
+ */ + public com.google.longrunning.Operation deactivateConfiguration( + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeactivateConfigurationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Reactivates the given configuration.
+     * 
+ */ + public com.google.longrunning.Operation reactivateConfiguration( + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getReactivateConfigurationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * License Usage information for a Configuration.
+     * 
+ */ + public com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + queryConfigurationLicenseUsage( + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getQueryConfigurationLicenseUsageMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Aggregates Usage per Instance for a Configuration.
+     * 
+ */ + public com.google.cloud.licensemanager.v1.AggregateUsageResponse aggregateUsage( + com.google.cloud.licensemanager.v1.AggregateUsageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAggregateUsageMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Products in a given project and location.
+     * 
+ */ + public com.google.cloud.licensemanager.v1.ListProductsResponse listProducts( + com.google.cloud.licensemanager.v1.ListProductsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProductsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Product.
+     * 
+ */ + public com.google.cloud.licensemanager.v1.Product getProduct( + com.google.cloud.licensemanager.v1.GetProductRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProductMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service LicenseManager. + * + *
+   * Service describing handlers for resources
+   * 
+ */ + public static final class LicenseManagerFutureStub + extends io.grpc.stub.AbstractFutureStub { + private LicenseManagerFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LicenseManagerFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LicenseManagerFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists Configurations in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.licensemanager.v1.ListConfigurationsResponse> + listConfigurations(com.google.cloud.licensemanager.v1.ListConfigurationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListConfigurationsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Configuration.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.licensemanager.v1.Configuration> + getConfiguration(com.google.cloud.licensemanager.v1.GetConfigurationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetConfigurationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Configuration in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createConfiguration(com.google.cloud.licensemanager.v1.CreateConfigurationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateConfigurationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Configuration.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateConfiguration(com.google.cloud.licensemanager.v1.UpdateConfigurationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateConfigurationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Configuration.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteConfiguration(com.google.cloud.licensemanager.v1.DeleteConfigurationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteConfigurationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Instances in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.licensemanager.v1.ListInstancesResponse> + listInstances(com.google.cloud.licensemanager.v1.ListInstancesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListInstancesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.licensemanager.v1.Instance> + getInstance(com.google.cloud.licensemanager.v1.GetInstanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deactivates the given configuration.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deactivateConfiguration( + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeactivateConfigurationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Reactivates the given configuration.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + reactivateConfiguration( + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getReactivateConfigurationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * License Usage information for a Configuration.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse> + queryConfigurationLicenseUsage( + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getQueryConfigurationLicenseUsageMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Aggregates Usage per Instance for a Configuration.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.licensemanager.v1.AggregateUsageResponse> + aggregateUsage(com.google.cloud.licensemanager.v1.AggregateUsageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAggregateUsageMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Products in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.licensemanager.v1.ListProductsResponse> + listProducts(com.google.cloud.licensemanager.v1.ListProductsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListProductsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Product.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.licensemanager.v1.Product> + getProduct(com.google.cloud.licensemanager.v1.GetProductRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetProductMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_CONFIGURATIONS = 0; + private static final int METHODID_GET_CONFIGURATION = 1; + private static final int METHODID_CREATE_CONFIGURATION = 2; + private static final int METHODID_UPDATE_CONFIGURATION = 3; + private static final int METHODID_DELETE_CONFIGURATION = 4; + private static final int METHODID_LIST_INSTANCES = 5; + private static final int METHODID_GET_INSTANCE = 6; + private static final int METHODID_DEACTIVATE_CONFIGURATION = 7; + private static final int METHODID_REACTIVATE_CONFIGURATION = 8; + private static final int METHODID_QUERY_CONFIGURATION_LICENSE_USAGE = 9; + private static final int METHODID_AGGREGATE_USAGE = 10; + private static final int METHODID_LIST_PRODUCTS = 11; + private static final int METHODID_GET_PRODUCT = 12; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_CONFIGURATIONS: + serviceImpl.listConfigurations( + (com.google.cloud.licensemanager.v1.ListConfigurationsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.licensemanager.v1.ListConfigurationsResponse>) + responseObserver); + break; + case METHODID_GET_CONFIGURATION: + serviceImpl.getConfiguration( + (com.google.cloud.licensemanager.v1.GetConfigurationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_CONFIGURATION: + serviceImpl.createConfiguration( + (com.google.cloud.licensemanager.v1.CreateConfigurationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_CONFIGURATION: + serviceImpl.updateConfiguration( + (com.google.cloud.licensemanager.v1.UpdateConfigurationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_CONFIGURATION: + serviceImpl.deleteConfiguration( + (com.google.cloud.licensemanager.v1.DeleteConfigurationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_INSTANCES: + serviceImpl.listInstances( + (com.google.cloud.licensemanager.v1.ListInstancesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.licensemanager.v1.ListInstancesResponse>) + responseObserver); + break; + case METHODID_GET_INSTANCE: + serviceImpl.getInstance( + (com.google.cloud.licensemanager.v1.GetInstanceRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DEACTIVATE_CONFIGURATION: + serviceImpl.deactivateConfiguration( + (com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REACTIVATE_CONFIGURATION: + serviceImpl.reactivateConfiguration( + (com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_QUERY_CONFIGURATION_LICENSE_USAGE: + serviceImpl.queryConfigurationLicenseUsage( + (com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse>) + responseObserver); + break; + case METHODID_AGGREGATE_USAGE: + serviceImpl.aggregateUsage( + (com.google.cloud.licensemanager.v1.AggregateUsageRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.licensemanager.v1.AggregateUsageResponse>) + responseObserver); + break; + case METHODID_LIST_PRODUCTS: + serviceImpl.listProducts( + (com.google.cloud.licensemanager.v1.ListProductsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_PRODUCT: + serviceImpl.getProduct( + (com.google.cloud.licensemanager.v1.GetProductRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListConfigurationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.licensemanager.v1.ListConfigurationsRequest, + com.google.cloud.licensemanager.v1.ListConfigurationsResponse>( + service, METHODID_LIST_CONFIGURATIONS))) + .addMethod( + getGetConfigurationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.licensemanager.v1.GetConfigurationRequest, + com.google.cloud.licensemanager.v1.Configuration>( + service, METHODID_GET_CONFIGURATION))) + .addMethod( + getCreateConfigurationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.licensemanager.v1.CreateConfigurationRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_CONFIGURATION))) + .addMethod( + getUpdateConfigurationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_CONFIGURATION))) + .addMethod( + getDeleteConfigurationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_CONFIGURATION))) + .addMethod( + getListInstancesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.licensemanager.v1.ListInstancesRequest, + com.google.cloud.licensemanager.v1.ListInstancesResponse>( + service, METHODID_LIST_INSTANCES))) + .addMethod( + getGetInstanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.licensemanager.v1.GetInstanceRequest, + com.google.cloud.licensemanager.v1.Instance>(service, METHODID_GET_INSTANCE))) + .addMethod( + getDeactivateConfigurationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest, + com.google.longrunning.Operation>(service, METHODID_DEACTIVATE_CONFIGURATION))) + .addMethod( + getReactivateConfigurationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest, + com.google.longrunning.Operation>(service, METHODID_REACTIVATE_CONFIGURATION))) + .addMethod( + getQueryConfigurationLicenseUsageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest, + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse>( + service, METHODID_QUERY_CONFIGURATION_LICENSE_USAGE))) + .addMethod( + getAggregateUsageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.licensemanager.v1.AggregateUsageRequest, + com.google.cloud.licensemanager.v1.AggregateUsageResponse>( + service, METHODID_AGGREGATE_USAGE))) + .addMethod( + getListProductsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.licensemanager.v1.ListProductsRequest, + com.google.cloud.licensemanager.v1.ListProductsResponse>( + service, METHODID_LIST_PRODUCTS))) + .addMethod( + getGetProductMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.licensemanager.v1.GetProductRequest, + com.google.cloud.licensemanager.v1.Product>(service, METHODID_GET_PRODUCT))) + .build(); + } + + private abstract static class LicenseManagerBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + LicenseManagerBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("LicenseManager"); + } + } + + private static final class LicenseManagerFileDescriptorSupplier + extends LicenseManagerBaseDescriptorSupplier { + LicenseManagerFileDescriptorSupplier() {} + } + + private static final class LicenseManagerMethodDescriptorSupplier + extends LicenseManagerBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + LicenseManagerMethodDescriptorSupplier(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 (LicenseManagerGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new LicenseManagerFileDescriptorSupplier()) + .addMethod(getListConfigurationsMethod()) + .addMethod(getGetConfigurationMethod()) + .addMethod(getCreateConfigurationMethod()) + .addMethod(getUpdateConfigurationMethod()) + .addMethod(getDeleteConfigurationMethod()) + .addMethod(getListInstancesMethod()) + .addMethod(getGetInstanceMethod()) + .addMethod(getDeactivateConfigurationMethod()) + .addMethod(getReactivateConfigurationMethod()) + .addMethod(getQueryConfigurationLicenseUsageMethod()) + .addMethod(getAggregateUsageMethod()) + .addMethod(getListProductsMethod()) + .addMethod(getGetProductMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-licensemanager/owlbot.py b/java-licensemanager/owlbot.py new file mode 100644 index 000000000000..2ba11e6bba67 --- /dev/null +++ b/java-licensemanager/owlbot.py @@ -0,0 +1,36 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates(monorepo=True, excludes=[ + ".github/*", + ".kokoro/*", + "samples/*", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "SECURITY.md", + "java.header", + "license-checks.xml", + "renovate.json", + ".gitignore" +]) \ No newline at end of file diff --git a/java-licensemanager/pom.xml b/java-licensemanager/pom.xml new file mode 100644 index 000000000000..ef16ea12fe7a --- /dev/null +++ b/java-licensemanager/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + com.google.cloud + google-cloud-licensemanager-parent + pom + 0.0.1-SNAPSHOT + Google License Manager API Parent + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-jar-parent + 1.62.0-SNAPSHOT + ../google-cloud-jar-parent/pom.xml + + + + UTF-8 + UTF-8 + github + google-cloud-licensemanager-parent + + + + + + com.google.cloud + google-cloud-licensemanager + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-licensemanager-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-licensemanager-v1 + 0.0.1-SNAPSHOT + + + + + + + google-cloud-licensemanager + grpc-google-cloud-licensemanager-v1 + proto-google-cloud-licensemanager-v1 + google-cloud-licensemanager-bom + + + diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/clirr-ignored-differences.xml b/java-licensemanager/proto-google-cloud-licensemanager-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..b49429f62f1b --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/clirr-ignored-differences.xml @@ -0,0 +1,80 @@ + + + + + 7012 + com/google/cloud/licensemanager/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/licensemanager/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/licensemanager/v1/*OrBuilder + boolean has*(*) + + + + 7006 + com/google/cloud/licensemanager/v1/** + * getDefaultInstanceForType() + ** + + + 7006 + com/google/cloud/licensemanager/v1/** + * addRepeatedField(*) + ** + + + 7006 + com/google/cloud/licensemanager/v1/** + * clear() + ** + + + 7006 + com/google/cloud/licensemanager/v1/** + * clearField(*) + ** + + + 7006 + com/google/cloud/licensemanager/v1/** + * clearOneof(*) + ** + + + 7006 + com/google/cloud/licensemanager/v1/** + * clone() + ** + + + 7006 + com/google/cloud/licensemanager/v1/** + * mergeUnknownFields(*) + ** + + + 7006 + com/google/cloud/licensemanager/v1/** + * setField(*) + ** + + + 7006 + com/google/cloud/licensemanager/v1/** + * setRepeatedField(*) + ** + + + 7006 + com/google/cloud/licensemanager/v1/** + * setUnknownFields(*) + ** + + diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/pom.xml b/java-licensemanager/proto-google-cloud-licensemanager-v1/pom.xml new file mode 100644 index 000000000000..df5b6f4102fe --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-licensemanager-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-licensemanager-v1 + Proto library for google-cloud-licensemanager + + com.google.cloud + google-cloud-licensemanager-parent + 0.0.1-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 + + + diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ActivationState.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ActivationState.java new file mode 100644 index 000000000000..20f967e13731 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ActivationState.java @@ -0,0 +1,273 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/api_entities.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * State of the License Key activation on the instance.
+ * 
+ * + * Protobuf enum {@code google.cloud.licensemanager.v1.ActivationState} + */ +public enum ActivationState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The Status of the activation is unspecified
+   * 
+ * + * ACTIVATION_STATE_UNSPECIFIED = 0; + */ + ACTIVATION_STATE_UNSPECIFIED(0), + /** + * + * + *
+   * Activation key (MAK) requested for the instance.
+   * 
+ * + * ACTIVATION_STATE_KEY_REQUESTED = 1; + */ + ACTIVATION_STATE_KEY_REQUESTED(1), + /** + * + * + *
+   * License activation process is running on the instance.
+   * 
+ * + * ACTIVATION_STATE_ACTIVATING = 2; + */ + ACTIVATION_STATE_ACTIVATING(2), + /** + * + * + *
+   * License activation is complete on the instance.
+   * 
+ * + * ACTIVATION_STATE_ACTIVATED = 3; + */ + ACTIVATION_STATE_ACTIVATED(3), + /** + * + * + *
+   * License Key is deactivating on the instance.
+   * 
+ * + * ACTIVATION_STATE_DEACTIVATING = 4; + */ + ACTIVATION_STATE_DEACTIVATING(4), + /** + * + * + *
+   * License Key is deactivated on the instance.
+   * 
+ * + * ACTIVATION_STATE_DEACTIVATED = 5; + */ + ACTIVATION_STATE_DEACTIVATED(5), + /** + * + * + *
+   * License Key activation failed on the instance.
+   * 
+ * + * ACTIVATION_STATE_TERMINATED = 6; + */ + ACTIVATION_STATE_TERMINATED(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The Status of the activation is unspecified
+   * 
+ * + * ACTIVATION_STATE_UNSPECIFIED = 0; + */ + public static final int ACTIVATION_STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Activation key (MAK) requested for the instance.
+   * 
+ * + * ACTIVATION_STATE_KEY_REQUESTED = 1; + */ + public static final int ACTIVATION_STATE_KEY_REQUESTED_VALUE = 1; + + /** + * + * + *
+   * License activation process is running on the instance.
+   * 
+ * + * ACTIVATION_STATE_ACTIVATING = 2; + */ + public static final int ACTIVATION_STATE_ACTIVATING_VALUE = 2; + + /** + * + * + *
+   * License activation is complete on the instance.
+   * 
+ * + * ACTIVATION_STATE_ACTIVATED = 3; + */ + public static final int ACTIVATION_STATE_ACTIVATED_VALUE = 3; + + /** + * + * + *
+   * License Key is deactivating on the instance.
+   * 
+ * + * ACTIVATION_STATE_DEACTIVATING = 4; + */ + public static final int ACTIVATION_STATE_DEACTIVATING_VALUE = 4; + + /** + * + * + *
+   * License Key is deactivated on the instance.
+   * 
+ * + * ACTIVATION_STATE_DEACTIVATED = 5; + */ + public static final int ACTIVATION_STATE_DEACTIVATED_VALUE = 5; + + /** + * + * + *
+   * License Key activation failed on the instance.
+   * 
+ * + * ACTIVATION_STATE_TERMINATED = 6; + */ + public static final int ACTIVATION_STATE_TERMINATED_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ActivationState 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 ActivationState forNumber(int value) { + switch (value) { + case 0: + return ACTIVATION_STATE_UNSPECIFIED; + case 1: + return ACTIVATION_STATE_KEY_REQUESTED; + case 2: + return ACTIVATION_STATE_ACTIVATING; + case 3: + return ACTIVATION_STATE_ACTIVATED; + case 4: + return ACTIVATION_STATE_DEACTIVATING; + case 5: + return ACTIVATION_STATE_DEACTIVATED; + case 6: + return ACTIVATION_STATE_TERMINATED; + 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 ActivationState findValueByNumber(int number) { + return ActivationState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final ActivationState[] VALUES = values(); + + public static ActivationState 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 ActivationState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.licensemanager.v1.ActivationState) +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/AggregateUsageRequest.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/AggregateUsageRequest.java new file mode 100644 index 000000000000..3c3b5720222b --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/AggregateUsageRequest.java @@ -0,0 +1,1917 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for requesting aggregate of Usage per configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.AggregateUsageRequest} + */ +public final class AggregateUsageRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.AggregateUsageRequest) + AggregateUsageRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use AggregateUsageRequest.newBuilder() to construct. + private AggregateUsageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AggregateUsageRequest() { + name_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AggregateUsageRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_AggregateUsageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_AggregateUsageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.AggregateUsageRequest.class, + com.google.cloud.licensemanager.v1.AggregateUsageRequest.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Parent value for AggregateUsageRequest
+   * 
+ * + * + * 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. Parent value for AggregateUsageRequest
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
+   * Required. Licenses are purchased per month - so usage track needs start
+   * time of a month.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Licenses are purchased per month - so usage track needs start
+   * time of a month.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
+   * Required. Licenses are purchased per month - so usage track needs start
+   * time of a month.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Required. Usage track is always for a month. This parameter is for the end
+   * time of the month.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. Usage track is always for a month. This parameter is for the end
+   * time of the month.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Required. Usage track is always for a month. This parameter is for the end
+   * time of the month.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, orderBy_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(7, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, orderBy_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getEndTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.AggregateUsageRequest)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.AggregateUsageRequest other = + (com.google.cloud.licensemanager.v1.AggregateUsageRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.AggregateUsageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for requesting aggregate of Usage per configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.AggregateUsageRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.AggregateUsageRequest) + com.google.cloud.licensemanager.v1.AggregateUsageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_AggregateUsageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_AggregateUsageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.AggregateUsageRequest.class, + com.google.cloud.licensemanager.v1.AggregateUsageRequest.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.AggregateUsageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_AggregateUsageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.AggregateUsageRequest getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.AggregateUsageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.AggregateUsageRequest build() { + com.google.cloud.licensemanager.v1.AggregateUsageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.AggregateUsageRequest buildPartial() { + com.google.cloud.licensemanager.v1.AggregateUsageRequest result = + new com.google.cloud.licensemanager.v1.AggregateUsageRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.AggregateUsageRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.AggregateUsageRequest) { + return mergeFrom((com.google.cloud.licensemanager.v1.AggregateUsageRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.AggregateUsageRequest other) { + if (other == com.google.cloud.licensemanager.v1.AggregateUsageRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Parent value for AggregateUsageRequest
+     * 
+ * + * + * 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. Parent value for AggregateUsageRequest
+     * 
+ * + * + * 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. Parent value for AggregateUsageRequest
+     * 
+ * + * + * 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. Parent value for AggregateUsageRequest
+     * 
+ * + * + * 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. Parent value for AggregateUsageRequest
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 3 [(.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 token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
+     * Required. Licenses are purchased per month - so usage track needs start
+     * time of a month.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Required. Licenses are purchased per month - so usage track needs start
+     * time of a month.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Licenses are purchased per month - so usage track needs start
+     * time of a month.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Licenses are purchased per month - so usage track needs start
+     * time of a month.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Licenses are purchased per month - so usage track needs start
+     * time of a month.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Licenses are purchased per month - so usage track needs start
+     * time of a month.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000020); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Licenses are purchased per month - so usage track needs start
+     * time of a month.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Licenses are purchased per month - so usage track needs start
+     * time of a month.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + + /** + * + * + *
+     * Required. Licenses are purchased per month - so usage track needs start
+     * time of a month.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Required. Usage track is always for a month. This parameter is for the end
+     * time of the month.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Required. Usage track is always for a month. This parameter is for the end
+     * time of the month.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Usage track is always for a month. This parameter is for the end
+     * time of the month.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Usage track is always for a month. This parameter is for the end
+     * time of the month.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Usage track is always for a month. This parameter is for the end
+     * time of the month.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Usage track is always for a month. This parameter is for the end
+     * time of the month.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000040); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Usage track is always for a month. This parameter is for the end
+     * time of the month.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Usage track is always for a month. This parameter is for the end
+     * time of the month.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Required. Usage track is always for a month. This parameter is for the end
+     * time of the month.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.AggregateUsageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.AggregateUsageRequest) + private static final com.google.cloud.licensemanager.v1.AggregateUsageRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.AggregateUsageRequest(); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AggregateUsageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.AggregateUsageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/AggregateUsageRequestOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/AggregateUsageRequestOrBuilder.java new file mode 100644 index 000000000000..e2721f7760bb --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/AggregateUsageRequestOrBuilder.java @@ -0,0 +1,231 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface AggregateUsageRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.AggregateUsageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for AggregateUsageRequest
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Parent value for AggregateUsageRequest
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Required. Licenses are purchased per month - so usage track needs start
+   * time of a month.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
+   * Required. Licenses are purchased per month - so usage track needs start
+   * time of a month.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
+   * Required. Licenses are purchased per month - so usage track needs start
+   * time of a month.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Required. Usage track is always for a month. This parameter is for the end
+   * time of the month.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Required. Usage track is always for a month. This parameter is for the end
+   * time of the month.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Required. Usage track is always for a month. This parameter is for the end
+   * time of the month.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/AggregateUsageResponse.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/AggregateUsageResponse.java new file mode 100644 index 000000000000..51264f75a05f --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/AggregateUsageResponse.java @@ -0,0 +1,1439 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for response for aggregating usage count
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.AggregateUsageResponse} + */ +public final class AggregateUsageResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.AggregateUsageResponse) + AggregateUsageResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use AggregateUsageResponse.newBuilder() to construct. + private AggregateUsageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AggregateUsageResponse() { + usages_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AggregateUsageResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_AggregateUsageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_AggregateUsageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.AggregateUsageResponse.class, + com.google.cloud.licensemanager.v1.AggregateUsageResponse.Builder.class); + } + + public static final int USAGES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List usages_; + + /** + * + * + *
+   * The aggregated records of usage per configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + @java.lang.Override + public java.util.List getUsagesList() { + return usages_; + } + + /** + * + * + *
+   * The aggregated records of usage per configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + @java.lang.Override + public java.util.List + getUsagesOrBuilderList() { + return usages_; + } + + /** + * + * + *
+   * The aggregated records of usage per configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + @java.lang.Override + public int getUsagesCount() { + return usages_.size(); + } + + /** + * + * + *
+   * The aggregated records of usage per configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.Usage getUsages(int index) { + return usages_.get(index); + } + + /** + * + * + *
+   * The aggregated records of usage per configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.UsageOrBuilder getUsagesOrBuilder(int index) { + return usages_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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 identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < usages_.size(); i++) { + output.writeMessage(1, usages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < usages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, usages_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.AggregateUsageResponse)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.AggregateUsageResponse other = + (com.google.cloud.licensemanager.v1.AggregateUsageResponse) obj; + + if (!getUsagesList().equals(other.getUsagesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUsagesCount() > 0) { + hash = (37 * hash) + USAGES_FIELD_NUMBER; + hash = (53 * hash) + getUsagesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.AggregateUsageResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for response for aggregating usage count
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.AggregateUsageResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.AggregateUsageResponse) + com.google.cloud.licensemanager.v1.AggregateUsageResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_AggregateUsageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_AggregateUsageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.AggregateUsageResponse.class, + com.google.cloud.licensemanager.v1.AggregateUsageResponse.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.AggregateUsageResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (usagesBuilder_ == null) { + usages_ = java.util.Collections.emptyList(); + } else { + usages_ = null; + usagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_AggregateUsageResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.AggregateUsageResponse getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.AggregateUsageResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.AggregateUsageResponse build() { + com.google.cloud.licensemanager.v1.AggregateUsageResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.AggregateUsageResponse buildPartial() { + com.google.cloud.licensemanager.v1.AggregateUsageResponse result = + new com.google.cloud.licensemanager.v1.AggregateUsageResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.licensemanager.v1.AggregateUsageResponse result) { + if (usagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + usages_ = java.util.Collections.unmodifiableList(usages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.usages_ = usages_; + } else { + result.usages_ = usagesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.AggregateUsageResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.AggregateUsageResponse) { + return mergeFrom((com.google.cloud.licensemanager.v1.AggregateUsageResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.AggregateUsageResponse other) { + if (other == com.google.cloud.licensemanager.v1.AggregateUsageResponse.getDefaultInstance()) + return this; + if (usagesBuilder_ == null) { + if (!other.usages_.isEmpty()) { + if (usages_.isEmpty()) { + usages_ = other.usages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUsagesIsMutable(); + usages_.addAll(other.usages_); + } + onChanged(); + } + } else { + if (!other.usages_.isEmpty()) { + if (usagesBuilder_.isEmpty()) { + usagesBuilder_.dispose(); + usagesBuilder_ = null; + usages_ = other.usages_; + bitField0_ = (bitField0_ & ~0x00000001); + usagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getUsagesFieldBuilder() + : null; + } else { + usagesBuilder_.addAllMessages(other.usages_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.licensemanager.v1.Usage m = + input.readMessage( + com.google.cloud.licensemanager.v1.Usage.parser(), extensionRegistry); + if (usagesBuilder_ == null) { + ensureUsagesIsMutable(); + usages_.add(m); + } else { + usagesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List usages_ = + java.util.Collections.emptyList(); + + private void ensureUsagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + usages_ = new java.util.ArrayList(usages_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.licensemanager.v1.Usage, + com.google.cloud.licensemanager.v1.Usage.Builder, + com.google.cloud.licensemanager.v1.UsageOrBuilder> + usagesBuilder_; + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public java.util.List getUsagesList() { + if (usagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(usages_); + } else { + return usagesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public int getUsagesCount() { + if (usagesBuilder_ == null) { + return usages_.size(); + } else { + return usagesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public com.google.cloud.licensemanager.v1.Usage getUsages(int index) { + if (usagesBuilder_ == null) { + return usages_.get(index); + } else { + return usagesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public Builder setUsages(int index, com.google.cloud.licensemanager.v1.Usage value) { + if (usagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsagesIsMutable(); + usages_.set(index, value); + onChanged(); + } else { + usagesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public Builder setUsages( + int index, com.google.cloud.licensemanager.v1.Usage.Builder builderForValue) { + if (usagesBuilder_ == null) { + ensureUsagesIsMutable(); + usages_.set(index, builderForValue.build()); + onChanged(); + } else { + usagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public Builder addUsages(com.google.cloud.licensemanager.v1.Usage value) { + if (usagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsagesIsMutable(); + usages_.add(value); + onChanged(); + } else { + usagesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public Builder addUsages(int index, com.google.cloud.licensemanager.v1.Usage value) { + if (usagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsagesIsMutable(); + usages_.add(index, value); + onChanged(); + } else { + usagesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public Builder addUsages(com.google.cloud.licensemanager.v1.Usage.Builder builderForValue) { + if (usagesBuilder_ == null) { + ensureUsagesIsMutable(); + usages_.add(builderForValue.build()); + onChanged(); + } else { + usagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public Builder addUsages( + int index, com.google.cloud.licensemanager.v1.Usage.Builder builderForValue) { + if (usagesBuilder_ == null) { + ensureUsagesIsMutable(); + usages_.add(index, builderForValue.build()); + onChanged(); + } else { + usagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public Builder addAllUsages( + java.lang.Iterable values) { + if (usagesBuilder_ == null) { + ensureUsagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, usages_); + onChanged(); + } else { + usagesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public Builder clearUsages() { + if (usagesBuilder_ == null) { + usages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + usagesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public Builder removeUsages(int index) { + if (usagesBuilder_ == null) { + ensureUsagesIsMutable(); + usages_.remove(index); + onChanged(); + } else { + usagesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public com.google.cloud.licensemanager.v1.Usage.Builder getUsagesBuilder(int index) { + return getUsagesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public com.google.cloud.licensemanager.v1.UsageOrBuilder getUsagesOrBuilder(int index) { + if (usagesBuilder_ == null) { + return usages_.get(index); + } else { + return usagesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public java.util.List + getUsagesOrBuilderList() { + if (usagesBuilder_ != null) { + return usagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(usages_); + } + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public com.google.cloud.licensemanager.v1.Usage.Builder addUsagesBuilder() { + return getUsagesFieldBuilder() + .addBuilder(com.google.cloud.licensemanager.v1.Usage.getDefaultInstance()); + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public com.google.cloud.licensemanager.v1.Usage.Builder addUsagesBuilder(int index) { + return getUsagesFieldBuilder() + .addBuilder(index, com.google.cloud.licensemanager.v1.Usage.getDefaultInstance()); + } + + /** + * + * + *
+     * The aggregated records of usage per configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + public java.util.List getUsagesBuilderList() { + return getUsagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.licensemanager.v1.Usage, + com.google.cloud.licensemanager.v1.Usage.Builder, + com.google.cloud.licensemanager.v1.UsageOrBuilder> + getUsagesFieldBuilder() { + if (usagesBuilder_ == null) { + usagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.licensemanager.v1.Usage, + com.google.cloud.licensemanager.v1.Usage.Builder, + com.google.cloud.licensemanager.v1.UsageOrBuilder>( + usages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + usages_ = null; + } + return usagesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.AggregateUsageResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.AggregateUsageResponse) + private static final com.google.cloud.licensemanager.v1.AggregateUsageResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.AggregateUsageResponse(); + } + + public static com.google.cloud.licensemanager.v1.AggregateUsageResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AggregateUsageResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.AggregateUsageResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/AggregateUsageResponseOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/AggregateUsageResponseOrBuilder.java new file mode 100644 index 000000000000..e9d53c999dfd --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/AggregateUsageResponseOrBuilder.java @@ -0,0 +1,162 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface AggregateUsageResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.AggregateUsageResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The aggregated records of usage per configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + java.util.List getUsagesList(); + + /** + * + * + *
+   * The aggregated records of usage per configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + com.google.cloud.licensemanager.v1.Usage getUsages(int index); + + /** + * + * + *
+   * The aggregated records of usage per configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + int getUsagesCount(); + + /** + * + * + *
+   * The aggregated records of usage per configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + java.util.List + getUsagesOrBuilderList(); + + /** + * + * + *
+   * The aggregated records of usage per configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Usage usages = 1; + */ + com.google.cloud.licensemanager.v1.UsageOrBuilder getUsagesOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ApiEntitiesProto.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ApiEntitiesProto.java new file mode 100644 index 000000000000..d10bb1c41472 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ApiEntitiesProto.java @@ -0,0 +1,314 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/api_entities.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public final class ApiEntitiesProto { + private ApiEntitiesProto() {} + + 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_licensemanager_v1_Configuration_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_Configuration_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_Configuration_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_Configuration_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_BillingInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_BillingInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_UserCountBillingInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_UserCountBillingInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_UserCountUsage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_UserCountUsage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_Product_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_Product_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_Instance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_Instance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_Instance_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_Instance_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_Instance_ProductActivationEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_Instance_ProductActivationEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_Usage_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_Usage_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" + + "1google/cloud/licensemanager/v1/api_entities.proto\022\036google.cloud.licensemanager" + + ".v1\032\037google/api/field_behavior.proto\032\031go" + + "ogle/api/resource.proto\032\037google/protobuf/timestamp.proto\"\213\007\n\r" + + "Configuration\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\031\n" + + "\014display_name\030\005 \001(\tB\003\340A\002\022>\n" + + "\007product\030\006 \001(\tB-\340A\002\372A\'\n" + + "%licensemanager.googleapis.com/Product\022F\n" + + "\014license_type\030\007" + + " \001(\0162+.google.cloud.licensemanager.v1.LicenseTypeB\003\340A\002\022N\n" + + "\024current_billing_info\030\010" + + " \001(\0132+.google.cloud.licensemanager.v1.BillingInfoB\003\340A\002\022K\n" + + "\021next_billing_info\030\t " + + "\001(\0132+.google.cloud.licensemanager.v1.BillingInfoB\003\340A\002\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022N\n" + + "\006labels\030\004 \003(\01329.google.cloud.license" + + "manager.v1.Configuration.LabelsEntryB\003\340A\001\022G\n" + + "\005state\030\n" + + " \001(\01623.google.cloud.licensemanager.v1.Configuration.StateB\003\340A\003\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"X\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\020\n" + + "\014STATE_ACTIVE\020\001\022\023\n" + + "\017STATE_SUSPENDED\020\002\022\021\n\r" + + "STATE_DELETED\020\003:\230\001\352A\224\001\n" + + "+licensemanager.googleapis.com/Configuration\022Fprojects/{proje" + + "ct}/locations/{location}/configurations/{configuration}*\016configurations2\r" + + "configuration\"\346\001\n" + + "\013BillingInfo\022W\n" + + "\022user_count_billing\030\001" + + " \001(\01324.google.cloud.licensemanager.v1.UserCountBillingInfoB\003\340A\002H\000\0223\n\n" + + "start_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + + "\010end_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003B\026\n" + + "\024current_billing_info\"/\n" + + "\024UserCountBillingInfo\022\027\n\n" + + "user_count\030\001 \001(\005B\003\340A\002\"0\n" + + "\016UserCountUsage\022\036\n" + + "\021unique_user_count\030\001 \001(\005B\003\340A\002\"\315\003\n" + + "\007Product\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\024\n" + + "\007version\030\002 \001(\tB\003\340A\002\022\034\n" + + "\017product_company\030\003 \001(\tB\003\340A\002\022A\n" + + "\005state\030\004 \001(\0162-.g" + + "oogle.cloud.licensemanager.v1.Product.StateB\003\340A\003\022\020\n" + + "\003sku\030\005 \001(\tB\003\340A\002\022\030\n" + + "\013description\030\006 \001(\tB\003\340A\002\022\031\n" + + "\014display_name\030\007 \001(\tB\003\340A\002\"v\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\026\n" + + "\022STATE_PROVISIONING\020\001\022\021\n\r" + + "STATE_RUNNING\020\002\022\025\n" + + "\021STATE_TERMINATING\020\003\022\024\n" + + "\020STATE_TERMINATED\020\004:y\352Av\n" + + "%licensemanager.googleapis.com/Product\022:projects/{project}/locations/{locat" + + "ion}/products/{product}*\010products2\007product\"\233\007\n" + + "\010Instance\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022I\n" + + "\006labels\030\004 \003(\01324" + + ".google.cloud.licensemanager.v1.Instance.LabelsEntryB\003\340A\001\022B\n" + + "\005state\030\005 \001(\0162..googl" + + "e.cloud.licensemanager.v1.Instance.StateB\003\340A\003\022\023\n" + + "\006region\030\006 \001(\tB\003\340A\003\022`\n" + + "\022product_activation\030\007 \003(\0132?.google.cloud.licenseman" + + "ager.v1.Instance.ProductActivationEntryB\003\340A\003\022\037\n" + + "\022license_version_id\030\010 \001(\tB\003\340A\003\022H\n" + + "\020compute_instance\030\t \001(\tB.\340A\002\372A(\n" + + "&compute.googleapis.com/ComputeInstance\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\032i\n" + + "\026ProductActivationEntry\022\013\n" + + "\003key\030\001 \001(\t\022>\n" + + "\005value\030\002" + + " \001(\0162/.google.cloud.licensemanager.v1.ActivationState:\0028\001\"\204\001\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\020\n" + + "\014PROVISIONING\020\001\022\013\n" + + "\007STAGING\020\002\022\013\n" + + "\007RUNNING\020\003\022\014\n" + + "\010STOPPING\020\004\022\013\n" + + "\007STOPPED\020\005\022\016\n\n" + + "TERMINATED\020\006\022\r\n" + + "\tREPAIRING\020\007:~\352A{\n" + + "&licensemanager.googleapis.com/Ins" + + "tance\022 + * Billing Information. + * + * + * Protobuf type {@code google.cloud.licensemanager.v1.BillingInfo} + */ +public final class BillingInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.BillingInfo) + BillingInfoOrBuilder { + private static final long serialVersionUID = 0L; + + // Use BillingInfo.newBuilder() to construct. + private BillingInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BillingInfo() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BillingInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_BillingInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_BillingInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.BillingInfo.class, + com.google.cloud.licensemanager.v1.BillingInfo.Builder.class); + } + + private int bitField0_; + private int currentBillingInfoCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object currentBillingInfo_; + + public enum CurrentBillingInfoCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + USER_COUNT_BILLING(1), + CURRENTBILLINGINFO_NOT_SET(0); + private final int value; + + private CurrentBillingInfoCase(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 CurrentBillingInfoCase valueOf(int value) { + return forNumber(value); + } + + public static CurrentBillingInfoCase forNumber(int value) { + switch (value) { + case 1: + return USER_COUNT_BILLING; + case 0: + return CURRENTBILLINGINFO_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CurrentBillingInfoCase getCurrentBillingInfoCase() { + return CurrentBillingInfoCase.forNumber(currentBillingInfoCase_); + } + + public static final int USER_COUNT_BILLING_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Required. This type of billing uses user count for computing total
+   * charge.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.UserCountBillingInfo user_count_billing = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userCountBilling field is set. + */ + @java.lang.Override + public boolean hasUserCountBilling() { + return currentBillingInfoCase_ == 1; + } + + /** + * + * + *
+   * Required. This type of billing uses user count for computing total
+   * charge.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.UserCountBillingInfo user_count_billing = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userCountBilling. + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.UserCountBillingInfo getUserCountBilling() { + if (currentBillingInfoCase_ == 1) { + return (com.google.cloud.licensemanager.v1.UserCountBillingInfo) currentBillingInfo_; + } + return com.google.cloud.licensemanager.v1.UserCountBillingInfo.getDefaultInstance(); + } + + /** + * + * + *
+   * Required. This type of billing uses user count for computing total
+   * charge.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.UserCountBillingInfo user_count_billing = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.UserCountBillingInfoOrBuilder + getUserCountBillingOrBuilder() { + if (currentBillingInfoCase_ == 1) { + return (com.google.cloud.licensemanager.v1.UserCountBillingInfo) currentBillingInfo_; + } + return com.google.cloud.licensemanager.v1.UserCountBillingInfo.getDefaultInstance(); + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
+   * Output only. When the billing starts.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. When the billing starts.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
+   * Output only. When the billing starts.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Output only. When the billing ends.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. When the billing ends.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Output only. When the billing ends.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (currentBillingInfoCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.licensemanager.v1.UserCountBillingInfo) currentBillingInfo_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (currentBillingInfoCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.licensemanager.v1.UserCountBillingInfo) currentBillingInfo_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.BillingInfo)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.BillingInfo other = + (com.google.cloud.licensemanager.v1.BillingInfo) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getCurrentBillingInfoCase().equals(other.getCurrentBillingInfoCase())) return false; + switch (currentBillingInfoCase_) { + case 1: + if (!getUserCountBilling().equals(other.getUserCountBilling())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + switch (currentBillingInfoCase_) { + case 1: + hash = (37 * hash) + USER_COUNT_BILLING_FIELD_NUMBER; + hash = (53 * hash) + getUserCountBilling().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.BillingInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.BillingInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.BillingInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.BillingInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.BillingInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.BillingInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.BillingInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.BillingInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.BillingInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.BillingInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.BillingInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.BillingInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.licensemanager.v1.BillingInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Billing Information.
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.BillingInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.BillingInfo) + com.google.cloud.licensemanager.v1.BillingInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_BillingInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_BillingInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.BillingInfo.class, + com.google.cloud.licensemanager.v1.BillingInfo.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.BillingInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (userCountBillingBuilder_ != null) { + userCountBillingBuilder_.clear(); + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + currentBillingInfoCase_ = 0; + currentBillingInfo_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_BillingInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.BillingInfo getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.BillingInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.BillingInfo build() { + com.google.cloud.licensemanager.v1.BillingInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.BillingInfo buildPartial() { + com.google.cloud.licensemanager.v1.BillingInfo result = + new com.google.cloud.licensemanager.v1.BillingInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.BillingInfo result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.licensemanager.v1.BillingInfo result) { + result.currentBillingInfoCase_ = currentBillingInfoCase_; + result.currentBillingInfo_ = this.currentBillingInfo_; + if (currentBillingInfoCase_ == 1 && userCountBillingBuilder_ != null) { + result.currentBillingInfo_ = userCountBillingBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.BillingInfo) { + return mergeFrom((com.google.cloud.licensemanager.v1.BillingInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.BillingInfo other) { + if (other == com.google.cloud.licensemanager.v1.BillingInfo.getDefaultInstance()) return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + switch (other.getCurrentBillingInfoCase()) { + case USER_COUNT_BILLING: + { + mergeUserCountBilling(other.getUserCountBilling()); + break; + } + case CURRENTBILLINGINFO_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( + getUserCountBillingFieldBuilder().getBuilder(), extensionRegistry); + currentBillingInfoCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int currentBillingInfoCase_ = 0; + private java.lang.Object currentBillingInfo_; + + public CurrentBillingInfoCase getCurrentBillingInfoCase() { + return CurrentBillingInfoCase.forNumber(currentBillingInfoCase_); + } + + public Builder clearCurrentBillingInfo() { + currentBillingInfoCase_ = 0; + currentBillingInfo_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.UserCountBillingInfo, + com.google.cloud.licensemanager.v1.UserCountBillingInfo.Builder, + com.google.cloud.licensemanager.v1.UserCountBillingInfoOrBuilder> + userCountBillingBuilder_; + + /** + * + * + *
+     * Required. This type of billing uses user count for computing total
+     * charge.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.UserCountBillingInfo user_count_billing = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userCountBilling field is set. + */ + @java.lang.Override + public boolean hasUserCountBilling() { + return currentBillingInfoCase_ == 1; + } + + /** + * + * + *
+     * Required. This type of billing uses user count for computing total
+     * charge.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.UserCountBillingInfo user_count_billing = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userCountBilling. + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.UserCountBillingInfo getUserCountBilling() { + if (userCountBillingBuilder_ == null) { + if (currentBillingInfoCase_ == 1) { + return (com.google.cloud.licensemanager.v1.UserCountBillingInfo) currentBillingInfo_; + } + return com.google.cloud.licensemanager.v1.UserCountBillingInfo.getDefaultInstance(); + } else { + if (currentBillingInfoCase_ == 1) { + return userCountBillingBuilder_.getMessage(); + } + return com.google.cloud.licensemanager.v1.UserCountBillingInfo.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Required. This type of billing uses user count for computing total
+     * charge.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.UserCountBillingInfo user_count_billing = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserCountBilling( + com.google.cloud.licensemanager.v1.UserCountBillingInfo value) { + if (userCountBillingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentBillingInfo_ = value; + onChanged(); + } else { + userCountBillingBuilder_.setMessage(value); + } + currentBillingInfoCase_ = 1; + return this; + } + + /** + * + * + *
+     * Required. This type of billing uses user count for computing total
+     * charge.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.UserCountBillingInfo user_count_billing = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserCountBilling( + com.google.cloud.licensemanager.v1.UserCountBillingInfo.Builder builderForValue) { + if (userCountBillingBuilder_ == null) { + currentBillingInfo_ = builderForValue.build(); + onChanged(); + } else { + userCountBillingBuilder_.setMessage(builderForValue.build()); + } + currentBillingInfoCase_ = 1; + return this; + } + + /** + * + * + *
+     * Required. This type of billing uses user count for computing total
+     * charge.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.UserCountBillingInfo user_count_billing = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUserCountBilling( + com.google.cloud.licensemanager.v1.UserCountBillingInfo value) { + if (userCountBillingBuilder_ == null) { + if (currentBillingInfoCase_ == 1 + && currentBillingInfo_ + != com.google.cloud.licensemanager.v1.UserCountBillingInfo.getDefaultInstance()) { + currentBillingInfo_ = + com.google.cloud.licensemanager.v1.UserCountBillingInfo.newBuilder( + (com.google.cloud.licensemanager.v1.UserCountBillingInfo) currentBillingInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + currentBillingInfo_ = value; + } + onChanged(); + } else { + if (currentBillingInfoCase_ == 1) { + userCountBillingBuilder_.mergeFrom(value); + } else { + userCountBillingBuilder_.setMessage(value); + } + } + currentBillingInfoCase_ = 1; + return this; + } + + /** + * + * + *
+     * Required. This type of billing uses user count for computing total
+     * charge.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.UserCountBillingInfo user_count_billing = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUserCountBilling() { + if (userCountBillingBuilder_ == null) { + if (currentBillingInfoCase_ == 1) { + currentBillingInfoCase_ = 0; + currentBillingInfo_ = null; + onChanged(); + } + } else { + if (currentBillingInfoCase_ == 1) { + currentBillingInfoCase_ = 0; + currentBillingInfo_ = null; + } + userCountBillingBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. This type of billing uses user count for computing total
+     * charge.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.UserCountBillingInfo user_count_billing = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.licensemanager.v1.UserCountBillingInfo.Builder + getUserCountBillingBuilder() { + return getUserCountBillingFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. This type of billing uses user count for computing total
+     * charge.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.UserCountBillingInfo user_count_billing = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.UserCountBillingInfoOrBuilder + getUserCountBillingOrBuilder() { + if ((currentBillingInfoCase_ == 1) && (userCountBillingBuilder_ != null)) { + return userCountBillingBuilder_.getMessageOrBuilder(); + } else { + if (currentBillingInfoCase_ == 1) { + return (com.google.cloud.licensemanager.v1.UserCountBillingInfo) currentBillingInfo_; + } + return com.google.cloud.licensemanager.v1.UserCountBillingInfo.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Required. This type of billing uses user count for computing total
+     * charge.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.UserCountBillingInfo user_count_billing = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.UserCountBillingInfo, + com.google.cloud.licensemanager.v1.UserCountBillingInfo.Builder, + com.google.cloud.licensemanager.v1.UserCountBillingInfoOrBuilder> + getUserCountBillingFieldBuilder() { + if (userCountBillingBuilder_ == null) { + if (!(currentBillingInfoCase_ == 1)) { + currentBillingInfo_ = + com.google.cloud.licensemanager.v1.UserCountBillingInfo.getDefaultInstance(); + } + userCountBillingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.UserCountBillingInfo, + com.google.cloud.licensemanager.v1.UserCountBillingInfo.Builder, + com.google.cloud.licensemanager.v1.UserCountBillingInfoOrBuilder>( + (com.google.cloud.licensemanager.v1.UserCountBillingInfo) currentBillingInfo_, + getParentForChildren(), + isClean()); + currentBillingInfo_ = null; + } + currentBillingInfoCase_ = 1; + onChanged(); + return userCountBillingBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
+     * Output only. When the billing starts.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. When the billing starts.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. When the billing starts.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. When the billing starts.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. When the billing starts.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. When the billing starts.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. When the billing starts.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. When the billing starts.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + + /** + * + * + *
+     * Output only. When the billing starts.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Output only. When the billing ends.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. When the billing ends.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. When the billing ends.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. When the billing ends.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. When the billing ends.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. When the billing ends.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. When the billing ends.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. When the billing ends.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Output only. When the billing ends.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.BillingInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.BillingInfo) + private static final com.google.cloud.licensemanager.v1.BillingInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.BillingInfo(); + } + + public static com.google.cloud.licensemanager.v1.BillingInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BillingInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.BillingInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/BillingInfoOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/BillingInfoOrBuilder.java new file mode 100644 index 000000000000..09c3315c640c --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/BillingInfoOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/api_entities.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface BillingInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.BillingInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. This type of billing uses user count for computing total
+   * charge.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.UserCountBillingInfo user_count_billing = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userCountBilling field is set. + */ + boolean hasUserCountBilling(); + + /** + * + * + *
+   * Required. This type of billing uses user count for computing total
+   * charge.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.UserCountBillingInfo user_count_billing = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userCountBilling. + */ + com.google.cloud.licensemanager.v1.UserCountBillingInfo getUserCountBilling(); + + /** + * + * + *
+   * Required. This type of billing uses user count for computing total
+   * charge.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.UserCountBillingInfo user_count_billing = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.licensemanager.v1.UserCountBillingInfoOrBuilder getUserCountBillingOrBuilder(); + + /** + * + * + *
+   * Output only. When the billing starts.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
+   * Output only. When the billing starts.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
+   * Output only. When the billing starts.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. When the billing ends.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Output only. When the billing ends.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Output only. When the billing ends.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + com.google.cloud.licensemanager.v1.BillingInfo.CurrentBillingInfoCase getCurrentBillingInfoCase(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/Configuration.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/Configuration.java new file mode 100644 index 000000000000..89521ee2ce1f --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/Configuration.java @@ -0,0 +1,3126 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/api_entities.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Configuration for a Google SPLA product
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.Configuration} + */ +public final class Configuration extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.Configuration) + ConfigurationOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Configuration.newBuilder() to construct. + private Configuration(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Configuration() { + name_ = ""; + displayName_ = ""; + product_ = ""; + licenseType_ = 0; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Configuration(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Configuration_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Configuration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.Configuration.class, + com.google.cloud.licensemanager.v1.Configuration.Builder.class); + } + + /** + * + * + *
+   * State of the configuration.
+   * 
+ * + * Protobuf enum {@code google.cloud.licensemanager.v1.Configuration.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The Status of the configuration is unspecified
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Configuration is in active state.
+     * 
+ * + * STATE_ACTIVE = 1; + */ + STATE_ACTIVE(1), + /** + * + * + *
+     * Configuration is in deactivated state.
+     * 
+ * + * STATE_SUSPENDED = 2; + */ + STATE_SUSPENDED(2), + /** + * + * + *
+     * Configuration is in deleted state.
+     * 
+ * + * STATE_DELETED = 3; + */ + STATE_DELETED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The Status of the configuration is unspecified
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Configuration is in active state.
+     * 
+ * + * STATE_ACTIVE = 1; + */ + public static final int STATE_ACTIVE_VALUE = 1; + + /** + * + * + *
+     * Configuration is in deactivated state.
+     * 
+ * + * STATE_SUSPENDED = 2; + */ + public static final int STATE_SUSPENDED_VALUE = 2; + + /** + * + * + *
+     * Configuration is in deleted state.
+     * 
+ * + * STATE_DELETED = 3; + */ + public static final int STATE_DELETED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return STATE_ACTIVE; + case 2: + return STATE_SUSPENDED; + case 3: + return STATE_DELETED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.Configuration.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.licensemanager.v1.Configuration.State) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. name of resource
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. name of resource
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Required. User given name.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. User given name.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object product_ = ""; + + /** + * + * + *
+   * Required. Name field (with URL) of the Product offered for SPLA.
+   * 
+ * + * + * string product = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The product. + */ + @java.lang.Override + public java.lang.String getProduct() { + java.lang.Object ref = product_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + product_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name field (with URL) of the Product offered for SPLA.
+   * 
+ * + * + * string product = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for product. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProductBytes() { + java.lang.Object ref = product_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + product_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LICENSE_TYPE_FIELD_NUMBER = 7; + private int licenseType_ = 0; + + /** + * + * + *
+   * Required. LicenseType to be applied for billing
+   * 
+ * + * + * .google.cloud.licensemanager.v1.LicenseType license_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for licenseType. + */ + @java.lang.Override + public int getLicenseTypeValue() { + return licenseType_; + } + + /** + * + * + *
+   * Required. LicenseType to be applied for billing
+   * 
+ * + * + * .google.cloud.licensemanager.v1.LicenseType license_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The licenseType. + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.LicenseType getLicenseType() { + com.google.cloud.licensemanager.v1.LicenseType result = + com.google.cloud.licensemanager.v1.LicenseType.forNumber(licenseType_); + return result == null ? com.google.cloud.licensemanager.v1.LicenseType.UNRECOGNIZED : result; + } + + public static final int CURRENT_BILLING_INFO_FIELD_NUMBER = 8; + private com.google.cloud.licensemanager.v1.BillingInfo currentBillingInfo_; + + /** + * + * + *
+   * Required. Billing information applicable till end of the current month.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo current_billing_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the currentBillingInfo field is set. + */ + @java.lang.Override + public boolean hasCurrentBillingInfo() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Billing information applicable till end of the current month.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo current_billing_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The currentBillingInfo. + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.BillingInfo getCurrentBillingInfo() { + return currentBillingInfo_ == null + ? com.google.cloud.licensemanager.v1.BillingInfo.getDefaultInstance() + : currentBillingInfo_; + } + + /** + * + * + *
+   * Required. Billing information applicable till end of the current month.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo current_billing_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.BillingInfoOrBuilder getCurrentBillingInfoOrBuilder() { + return currentBillingInfo_ == null + ? com.google.cloud.licensemanager.v1.BillingInfo.getDefaultInstance() + : currentBillingInfo_; + } + + public static final int NEXT_BILLING_INFO_FIELD_NUMBER = 9; + private com.google.cloud.licensemanager.v1.BillingInfo nextBillingInfo_; + + /** + * + * + *
+   * Required. Billing information applicable for next month.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo next_billing_info = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nextBillingInfo field is set. + */ + @java.lang.Override + public boolean hasNextBillingInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. Billing information applicable for next month.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo next_billing_info = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nextBillingInfo. + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.BillingInfo getNextBillingInfo() { + return nextBillingInfo_ == null + ? com.google.cloud.licensemanager.v1.BillingInfo.getDefaultInstance() + : nextBillingInfo_; + } + + /** + * + * + *
+   * Required. Billing information applicable for next month.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo next_billing_info = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.BillingInfoOrBuilder getNextBillingInfoOrBuilder() { + return nextBillingInfo_ == null + ? com.google.cloud.licensemanager.v1.BillingInfo.getDefaultInstance() + : nextBillingInfo_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Configuration_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int STATE_FIELD_NUMBER = 10; + private int state_ = 0; + + /** + * + * + *
+   * Output only. State of the configuration.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. State of the configuration.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.Configuration.State getState() { + com.google.cloud.licensemanager.v1.Configuration.State result = + com.google.cloud.licensemanager.v1.Configuration.State.forNumber(state_); + return result == null + ? com.google.cloud.licensemanager.v1.Configuration.State.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, product_); + } + if (licenseType_ + != com.google.cloud.licensemanager.v1.LicenseType.LICENSE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, licenseType_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getCurrentBillingInfo()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getNextBillingInfo()); + } + if (state_ + != com.google.cloud.licensemanager.v1.Configuration.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(10, state_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, product_); + } + if (licenseType_ + != com.google.cloud.licensemanager.v1.LicenseType.LICENSE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, licenseType_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCurrentBillingInfo()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getNextBillingInfo()); + } + if (state_ + != com.google.cloud.licensemanager.v1.Configuration.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.Configuration)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.Configuration other = + (com.google.cloud.licensemanager.v1.Configuration) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getProduct().equals(other.getProduct())) return false; + if (licenseType_ != other.licenseType_) return false; + if (hasCurrentBillingInfo() != other.hasCurrentBillingInfo()) return false; + if (hasCurrentBillingInfo()) { + if (!getCurrentBillingInfo().equals(other.getCurrentBillingInfo())) return false; + } + if (hasNextBillingInfo() != other.hasNextBillingInfo()) return false; + if (hasNextBillingInfo()) { + if (!getNextBillingInfo().equals(other.getNextBillingInfo())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (state_ != other.state_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + hash = (37 * hash) + LICENSE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + licenseType_; + if (hasCurrentBillingInfo()) { + hash = (37 * hash) + CURRENT_BILLING_INFO_FIELD_NUMBER; + hash = (53 * hash) + getCurrentBillingInfo().hashCode(); + } + if (hasNextBillingInfo()) { + hash = (37 * hash) + NEXT_BILLING_INFO_FIELD_NUMBER; + hash = (53 * hash) + getNextBillingInfo().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.Configuration parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.Configuration parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Configuration parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.Configuration parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Configuration parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.Configuration parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Configuration parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.Configuration parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Configuration parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.Configuration parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Configuration parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.Configuration parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.licensemanager.v1.Configuration prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Configuration for a Google SPLA product
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.Configuration} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.Configuration) + com.google.cloud.licensemanager.v1.ConfigurationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Configuration_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Configuration_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.Configuration.class, + com.google.cloud.licensemanager.v1.Configuration.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.Configuration.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCurrentBillingInfoFieldBuilder(); + getNextBillingInfoFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + product_ = ""; + licenseType_ = 0; + currentBillingInfo_ = null; + if (currentBillingInfoBuilder_ != null) { + currentBillingInfoBuilder_.dispose(); + currentBillingInfoBuilder_ = null; + } + nextBillingInfo_ = null; + if (nextBillingInfoBuilder_ != null) { + nextBillingInfoBuilder_.dispose(); + nextBillingInfoBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Configuration_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.Configuration getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.Configuration.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.Configuration build() { + com.google.cloud.licensemanager.v1.Configuration result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.Configuration buildPartial() { + com.google.cloud.licensemanager.v1.Configuration result = + new com.google.cloud.licensemanager.v1.Configuration(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.Configuration result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.product_ = product_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.licenseType_ = licenseType_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.currentBillingInfo_ = + currentBillingInfoBuilder_ == null + ? currentBillingInfo_ + : currentBillingInfoBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.nextBillingInfo_ = + nextBillingInfoBuilder_ == null ? nextBillingInfo_ : nextBillingInfoBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.state_ = state_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.Configuration) { + return mergeFrom((com.google.cloud.licensemanager.v1.Configuration) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.Configuration other) { + if (other == com.google.cloud.licensemanager.v1.Configuration.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getProduct().isEmpty()) { + product_ = other.product_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.licenseType_ != 0) { + setLicenseTypeValue(other.getLicenseTypeValue()); + } + if (other.hasCurrentBillingInfo()) { + mergeCurrentBillingInfo(other.getCurrentBillingInfo()); + } + if (other.hasNextBillingInfo()) { + mergeNextBillingInfo(other.getNextBillingInfo()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000100; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000100; + break; + } // case 34 + case 42: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 42 + case 50: + { + product_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 50 + case 56: + { + licenseType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 56 + case 66: + { + input.readMessage( + getCurrentBillingInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 66 + case 74: + { + input.readMessage(getNextBillingInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 74 + case 80: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. name of resource
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. name of resource
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. name of resource
+     * 
+ * + * 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. name of resource
+     * 
+ * + * 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. name of resource
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Required. User given name.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. User given name.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. User given name.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. User given name.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. User given name.
+     * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object product_ = ""; + + /** + * + * + *
+     * Required. Name field (with URL) of the Product offered for SPLA.
+     * 
+ * + * + * string product = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The product. + */ + public java.lang.String getProduct() { + java.lang.Object ref = product_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + product_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name field (with URL) of the Product offered for SPLA.
+     * 
+ * + * + * string product = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for product. + */ + public com.google.protobuf.ByteString getProductBytes() { + java.lang.Object ref = product_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + product_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name field (with URL) of the Product offered for SPLA.
+     * 
+ * + * + * string product = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The product to set. + * @return This builder for chaining. + */ + public Builder setProduct(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + product_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name field (with URL) of the Product offered for SPLA.
+     * 
+ * + * + * string product = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearProduct() { + product_ = getDefaultInstance().getProduct(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name field (with URL) of the Product offered for SPLA.
+     * 
+ * + * + * string product = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for product to set. + * @return This builder for chaining. + */ + public Builder setProductBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + product_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int licenseType_ = 0; + + /** + * + * + *
+     * Required. LicenseType to be applied for billing
+     * 
+ * + * + * .google.cloud.licensemanager.v1.LicenseType license_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for licenseType. + */ + @java.lang.Override + public int getLicenseTypeValue() { + return licenseType_; + } + + /** + * + * + *
+     * Required. LicenseType to be applied for billing
+     * 
+ * + * + * .google.cloud.licensemanager.v1.LicenseType license_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for licenseType to set. + * @return This builder for chaining. + */ + public Builder setLicenseTypeValue(int value) { + licenseType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. LicenseType to be applied for billing
+     * 
+ * + * + * .google.cloud.licensemanager.v1.LicenseType license_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The licenseType. + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.LicenseType getLicenseType() { + com.google.cloud.licensemanager.v1.LicenseType result = + com.google.cloud.licensemanager.v1.LicenseType.forNumber(licenseType_); + return result == null ? com.google.cloud.licensemanager.v1.LicenseType.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Required. LicenseType to be applied for billing
+     * 
+ * + * + * .google.cloud.licensemanager.v1.LicenseType license_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The licenseType to set. + * @return This builder for chaining. + */ + public Builder setLicenseType(com.google.cloud.licensemanager.v1.LicenseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + licenseType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. LicenseType to be applied for billing
+     * 
+ * + * + * .google.cloud.licensemanager.v1.LicenseType license_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearLicenseType() { + bitField0_ = (bitField0_ & ~0x00000008); + licenseType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.licensemanager.v1.BillingInfo currentBillingInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.BillingInfo, + com.google.cloud.licensemanager.v1.BillingInfo.Builder, + com.google.cloud.licensemanager.v1.BillingInfoOrBuilder> + currentBillingInfoBuilder_; + + /** + * + * + *
+     * Required. Billing information applicable till end of the current month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo current_billing_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the currentBillingInfo field is set. + */ + public boolean hasCurrentBillingInfo() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Required. Billing information applicable till end of the current month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo current_billing_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The currentBillingInfo. + */ + public com.google.cloud.licensemanager.v1.BillingInfo getCurrentBillingInfo() { + if (currentBillingInfoBuilder_ == null) { + return currentBillingInfo_ == null + ? com.google.cloud.licensemanager.v1.BillingInfo.getDefaultInstance() + : currentBillingInfo_; + } else { + return currentBillingInfoBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Billing information applicable till end of the current month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo current_billing_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCurrentBillingInfo(com.google.cloud.licensemanager.v1.BillingInfo value) { + if (currentBillingInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentBillingInfo_ = value; + } else { + currentBillingInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Billing information applicable till end of the current month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo current_billing_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCurrentBillingInfo( + com.google.cloud.licensemanager.v1.BillingInfo.Builder builderForValue) { + if (currentBillingInfoBuilder_ == null) { + currentBillingInfo_ = builderForValue.build(); + } else { + currentBillingInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Billing information applicable till end of the current month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo current_billing_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCurrentBillingInfo(com.google.cloud.licensemanager.v1.BillingInfo value) { + if (currentBillingInfoBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && currentBillingInfo_ != null + && currentBillingInfo_ + != com.google.cloud.licensemanager.v1.BillingInfo.getDefaultInstance()) { + getCurrentBillingInfoBuilder().mergeFrom(value); + } else { + currentBillingInfo_ = value; + } + } else { + currentBillingInfoBuilder_.mergeFrom(value); + } + if (currentBillingInfo_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Billing information applicable till end of the current month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo current_billing_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCurrentBillingInfo() { + bitField0_ = (bitField0_ & ~0x00000010); + currentBillingInfo_ = null; + if (currentBillingInfoBuilder_ != null) { + currentBillingInfoBuilder_.dispose(); + currentBillingInfoBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Billing information applicable till end of the current month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo current_billing_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.licensemanager.v1.BillingInfo.Builder getCurrentBillingInfoBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getCurrentBillingInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Billing information applicable till end of the current month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo current_billing_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.licensemanager.v1.BillingInfoOrBuilder + getCurrentBillingInfoOrBuilder() { + if (currentBillingInfoBuilder_ != null) { + return currentBillingInfoBuilder_.getMessageOrBuilder(); + } else { + return currentBillingInfo_ == null + ? com.google.cloud.licensemanager.v1.BillingInfo.getDefaultInstance() + : currentBillingInfo_; + } + } + + /** + * + * + *
+     * Required. Billing information applicable till end of the current month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo current_billing_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.BillingInfo, + com.google.cloud.licensemanager.v1.BillingInfo.Builder, + com.google.cloud.licensemanager.v1.BillingInfoOrBuilder> + getCurrentBillingInfoFieldBuilder() { + if (currentBillingInfoBuilder_ == null) { + currentBillingInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.BillingInfo, + com.google.cloud.licensemanager.v1.BillingInfo.Builder, + com.google.cloud.licensemanager.v1.BillingInfoOrBuilder>( + getCurrentBillingInfo(), getParentForChildren(), isClean()); + currentBillingInfo_ = null; + } + return currentBillingInfoBuilder_; + } + + private com.google.cloud.licensemanager.v1.BillingInfo nextBillingInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.BillingInfo, + com.google.cloud.licensemanager.v1.BillingInfo.Builder, + com.google.cloud.licensemanager.v1.BillingInfoOrBuilder> + nextBillingInfoBuilder_; + + /** + * + * + *
+     * Required. Billing information applicable for next month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo next_billing_info = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nextBillingInfo field is set. + */ + public boolean hasNextBillingInfo() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Required. Billing information applicable for next month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo next_billing_info = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nextBillingInfo. + */ + public com.google.cloud.licensemanager.v1.BillingInfo getNextBillingInfo() { + if (nextBillingInfoBuilder_ == null) { + return nextBillingInfo_ == null + ? com.google.cloud.licensemanager.v1.BillingInfo.getDefaultInstance() + : nextBillingInfo_; + } else { + return nextBillingInfoBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Billing information applicable for next month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo next_billing_info = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNextBillingInfo(com.google.cloud.licensemanager.v1.BillingInfo value) { + if (nextBillingInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nextBillingInfo_ = value; + } else { + nextBillingInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Billing information applicable for next month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo next_billing_info = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNextBillingInfo( + com.google.cloud.licensemanager.v1.BillingInfo.Builder builderForValue) { + if (nextBillingInfoBuilder_ == null) { + nextBillingInfo_ = builderForValue.build(); + } else { + nextBillingInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Billing information applicable for next month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo next_billing_info = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNextBillingInfo(com.google.cloud.licensemanager.v1.BillingInfo value) { + if (nextBillingInfoBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && nextBillingInfo_ != null + && nextBillingInfo_ + != com.google.cloud.licensemanager.v1.BillingInfo.getDefaultInstance()) { + getNextBillingInfoBuilder().mergeFrom(value); + } else { + nextBillingInfo_ = value; + } + } else { + nextBillingInfoBuilder_.mergeFrom(value); + } + if (nextBillingInfo_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Billing information applicable for next month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo next_billing_info = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNextBillingInfo() { + bitField0_ = (bitField0_ & ~0x00000020); + nextBillingInfo_ = null; + if (nextBillingInfoBuilder_ != null) { + nextBillingInfoBuilder_.dispose(); + nextBillingInfoBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Billing information applicable for next month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo next_billing_info = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.licensemanager.v1.BillingInfo.Builder getNextBillingInfoBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getNextBillingInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Billing information applicable for next month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo next_billing_info = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.licensemanager.v1.BillingInfoOrBuilder getNextBillingInfoOrBuilder() { + if (nextBillingInfoBuilder_ != null) { + return nextBillingInfoBuilder_.getMessageOrBuilder(); + } else { + return nextBillingInfo_ == null + ? com.google.cloud.licensemanager.v1.BillingInfo.getDefaultInstance() + : nextBillingInfo_; + } + } + + /** + * + * + *
+     * Required. Billing information applicable for next month.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo next_billing_info = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.BillingInfo, + com.google.cloud.licensemanager.v1.BillingInfo.Builder, + com.google.cloud.licensemanager.v1.BillingInfoOrBuilder> + getNextBillingInfoFieldBuilder() { + if (nextBillingInfoBuilder_ == null) { + nextBillingInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.BillingInfo, + com.google.cloud.licensemanager.v1.BillingInfo.Builder, + com.google.cloud.licensemanager.v1.BillingInfoOrBuilder>( + getNextBillingInfo(), getParentForChildren(), isClean()); + nextBillingInfo_ = null; + } + return nextBillingInfoBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000100; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000100); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000100; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000100; + return this; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000100; + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. State of the configuration.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. State of the configuration.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. State of the configuration.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.Configuration.State getState() { + com.google.cloud.licensemanager.v1.Configuration.State result = + com.google.cloud.licensemanager.v1.Configuration.State.forNumber(state_); + return result == null + ? com.google.cloud.licensemanager.v1.Configuration.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. State of the configuration.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.licensemanager.v1.Configuration.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. State of the configuration.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000200); + state_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.Configuration) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.Configuration) + private static final com.google.cloud.licensemanager.v1.Configuration DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.Configuration(); + } + + public static com.google.cloud.licensemanager.v1.Configuration getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Configuration parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.Configuration getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ConfigurationName.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ConfigurationName.java new file mode 100644 index 000000000000..4cad02401ba9 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ConfigurationName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ConfigurationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CONFIGURATION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/configurations/{configuration}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String configuration; + + @Deprecated + protected ConfigurationName() { + project = null; + location = null; + configuration = null; + } + + private ConfigurationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + configuration = Preconditions.checkNotNull(builder.getConfiguration()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getConfiguration() { + return configuration; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ConfigurationName of(String project, String location, String configuration) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setConfiguration(configuration) + .build(); + } + + public static String format(String project, String location, String configuration) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setConfiguration(configuration) + .build() + .toString(); + } + + public static ConfigurationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CONFIGURATION.validatedMatch( + formattedString, "ConfigurationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("configuration")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ConfigurationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CONFIGURATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (configuration != null) { + fieldMapBuilder.put("configuration", configuration); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_CONFIGURATION.instantiate( + "project", project, "location", location, "configuration", configuration); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ConfigurationName that = ((ConfigurationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.configuration, that.configuration); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(configuration); + return h; + } + + /** Builder for projects/{project}/locations/{location}/configurations/{configuration}. */ + public static class Builder { + private String project; + private String location; + private String configuration; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getConfiguration() { + return configuration; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setConfiguration(String configuration) { + this.configuration = configuration; + return this; + } + + private Builder(ConfigurationName configurationName) { + this.project = configurationName.project; + this.location = configurationName.location; + this.configuration = configurationName.configuration; + } + + public ConfigurationName build() { + return new ConfigurationName(this); + } + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ConfigurationOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ConfigurationOrBuilder.java new file mode 100644 index 000000000000..dbdaff3c52b2 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ConfigurationOrBuilder.java @@ -0,0 +1,397 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/api_entities.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface ConfigurationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.Configuration) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. name of resource
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. name of resource
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. User given name.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Required. User given name.
+   * 
+ * + * string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. Name field (with URL) of the Product offered for SPLA.
+   * 
+ * + * + * string product = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The product. + */ + java.lang.String getProduct(); + + /** + * + * + *
+   * Required. Name field (with URL) of the Product offered for SPLA.
+   * 
+ * + * + * string product = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for product. + */ + com.google.protobuf.ByteString getProductBytes(); + + /** + * + * + *
+   * Required. LicenseType to be applied for billing
+   * 
+ * + * + * .google.cloud.licensemanager.v1.LicenseType license_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for licenseType. + */ + int getLicenseTypeValue(); + + /** + * + * + *
+   * Required. LicenseType to be applied for billing
+   * 
+ * + * + * .google.cloud.licensemanager.v1.LicenseType license_type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The licenseType. + */ + com.google.cloud.licensemanager.v1.LicenseType getLicenseType(); + + /** + * + * + *
+   * Required. Billing information applicable till end of the current month.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo current_billing_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the currentBillingInfo field is set. + */ + boolean hasCurrentBillingInfo(); + + /** + * + * + *
+   * Required. Billing information applicable till end of the current month.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo current_billing_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The currentBillingInfo. + */ + com.google.cloud.licensemanager.v1.BillingInfo getCurrentBillingInfo(); + + /** + * + * + *
+   * Required. Billing information applicable till end of the current month.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo current_billing_info = 8 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.licensemanager.v1.BillingInfoOrBuilder getCurrentBillingInfoOrBuilder(); + + /** + * + * + *
+   * Required. Billing information applicable for next month.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo next_billing_info = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nextBillingInfo field is set. + */ + boolean hasNextBillingInfo(); + + /** + * + * + *
+   * Required. Billing information applicable for next month.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo next_billing_info = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nextBillingInfo. + */ + com.google.cloud.licensemanager.v1.BillingInfo getNextBillingInfo(); + + /** + * + * + *
+   * Required. Billing information applicable for next month.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.BillingInfo next_billing_info = 9 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.licensemanager.v1.BillingInfoOrBuilder getNextBillingInfoOrBuilder(); + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. State of the configuration.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. State of the configuration.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.licensemanager.v1.Configuration.State getState(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/CreateConfigurationRequest.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/CreateConfigurationRequest.java new file mode 100644 index 000000000000..15df3f02f829 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/CreateConfigurationRequest.java @@ -0,0 +1,1447 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for creating a Configuration
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.CreateConfigurationRequest} + */ +public final class CreateConfigurationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.CreateConfigurationRequest) + CreateConfigurationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateConfigurationRequest.newBuilder() to construct. + private CreateConfigurationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateConfigurationRequest() { + parent_ = ""; + configurationId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateConfigurationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_CreateConfigurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_CreateConfigurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.CreateConfigurationRequest.class, + com.google.cloud.licensemanager.v1.CreateConfigurationRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * 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. Value for parent.
+   * 
+ * + * + * 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 CONFIGURATION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object configurationId_ = ""; + + /** + * + * + *
+   * Required. Id of the requesting object
+   * 
+ * + * string configuration_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The configurationId. + */ + @java.lang.Override + public java.lang.String getConfigurationId() { + java.lang.Object ref = configurationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + configurationId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Id of the requesting object
+   * 
+ * + * string configuration_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for configurationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConfigurationIdBytes() { + java.lang.Object ref = configurationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + configurationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIGURATION_FIELD_NUMBER = 3; + private com.google.cloud.licensemanager.v1.Configuration configuration_; + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the configuration field is set. + */ + @java.lang.Override + public boolean hasConfiguration() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The configuration. + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.Configuration getConfiguration() { + return configuration_ == null + ? com.google.cloud.licensemanager.v1.Configuration.getDefaultInstance() + : configuration_; + } + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.ConfigurationOrBuilder getConfigurationOrBuilder() { + return configuration_ == null + ? com.google.cloud.licensemanager.v1.Configuration.getDefaultInstance() + : configuration_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(configurationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, configurationId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getConfiguration()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(configurationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, configurationId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getConfiguration()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.CreateConfigurationRequest)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.CreateConfigurationRequest other = + (com.google.cloud.licensemanager.v1.CreateConfigurationRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getConfigurationId().equals(other.getConfigurationId())) return false; + if (hasConfiguration() != other.hasConfiguration()) return false; + if (hasConfiguration()) { + if (!getConfiguration().equals(other.getConfiguration())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.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) + CONFIGURATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getConfigurationId().hashCode(); + if (hasConfiguration()) { + hash = (37 * hash) + CONFIGURATION_FIELD_NUMBER; + hash = (53 * hash) + getConfiguration().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.CreateConfigurationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.CreateConfigurationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.CreateConfigurationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.CreateConfigurationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.CreateConfigurationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.CreateConfigurationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.CreateConfigurationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.CreateConfigurationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.CreateConfigurationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.CreateConfigurationRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.CreateConfigurationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.CreateConfigurationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.CreateConfigurationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for creating a Configuration
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.CreateConfigurationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.CreateConfigurationRequest) + com.google.cloud.licensemanager.v1.CreateConfigurationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_CreateConfigurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_CreateConfigurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.CreateConfigurationRequest.class, + com.google.cloud.licensemanager.v1.CreateConfigurationRequest.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.CreateConfigurationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConfigurationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + configurationId_ = ""; + configuration_ = null; + if (configurationBuilder_ != null) { + configurationBuilder_.dispose(); + configurationBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_CreateConfigurationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.CreateConfigurationRequest + getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.CreateConfigurationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.CreateConfigurationRequest build() { + com.google.cloud.licensemanager.v1.CreateConfigurationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.CreateConfigurationRequest buildPartial() { + com.google.cloud.licensemanager.v1.CreateConfigurationRequest result = + new com.google.cloud.licensemanager.v1.CreateConfigurationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.licensemanager.v1.CreateConfigurationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.configurationId_ = configurationId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.configuration_ = + configurationBuilder_ == null ? configuration_ : configurationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.CreateConfigurationRequest) { + return mergeFrom((com.google.cloud.licensemanager.v1.CreateConfigurationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.CreateConfigurationRequest other) { + if (other + == com.google.cloud.licensemanager.v1.CreateConfigurationRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getConfigurationId().isEmpty()) { + configurationId_ = other.configurationId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasConfiguration()) { + mergeConfiguration(other.getConfiguration()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + configurationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getConfigurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object configurationId_ = ""; + + /** + * + * + *
+     * Required. Id of the requesting object
+     * 
+ * + * string configuration_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The configurationId. + */ + public java.lang.String getConfigurationId() { + java.lang.Object ref = configurationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + configurationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Id of the requesting object
+     * 
+ * + * string configuration_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for configurationId. + */ + public com.google.protobuf.ByteString getConfigurationIdBytes() { + java.lang.Object ref = configurationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + configurationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Id of the requesting object
+     * 
+ * + * string configuration_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The configurationId to set. + * @return This builder for chaining. + */ + public Builder setConfigurationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + configurationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Id of the requesting object
+     * 
+ * + * string configuration_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearConfigurationId() { + configurationId_ = getDefaultInstance().getConfigurationId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Id of the requesting object
+     * 
+ * + * string configuration_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for configurationId to set. + * @return This builder for chaining. + */ + public Builder setConfigurationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + configurationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.licensemanager.v1.Configuration configuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.Configuration, + com.google.cloud.licensemanager.v1.Configuration.Builder, + com.google.cloud.licensemanager.v1.ConfigurationOrBuilder> + configurationBuilder_; + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the configuration field is set. + */ + public boolean hasConfiguration() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The configuration. + */ + public com.google.cloud.licensemanager.v1.Configuration getConfiguration() { + if (configurationBuilder_ == null) { + return configuration_ == null + ? com.google.cloud.licensemanager.v1.Configuration.getDefaultInstance() + : configuration_; + } else { + return configurationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfiguration(com.google.cloud.licensemanager.v1.Configuration value) { + if (configurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configuration_ = value; + } else { + configurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfiguration( + com.google.cloud.licensemanager.v1.Configuration.Builder builderForValue) { + if (configurationBuilder_ == null) { + configuration_ = builderForValue.build(); + } else { + configurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeConfiguration(com.google.cloud.licensemanager.v1.Configuration value) { + if (configurationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && configuration_ != null + && configuration_ + != com.google.cloud.licensemanager.v1.Configuration.getDefaultInstance()) { + getConfigurationBuilder().mergeFrom(value); + } else { + configuration_ = value; + } + } else { + configurationBuilder_.mergeFrom(value); + } + if (configuration_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConfiguration() { + bitField0_ = (bitField0_ & ~0x00000004); + configuration_ = null; + if (configurationBuilder_ != null) { + configurationBuilder_.dispose(); + configurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.licensemanager.v1.Configuration.Builder getConfigurationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getConfigurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.licensemanager.v1.ConfigurationOrBuilder getConfigurationOrBuilder() { + if (configurationBuilder_ != null) { + return configurationBuilder_.getMessageOrBuilder(); + } else { + return configuration_ == null + ? com.google.cloud.licensemanager.v1.Configuration.getDefaultInstance() + : configuration_; + } + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.Configuration, + com.google.cloud.licensemanager.v1.Configuration.Builder, + com.google.cloud.licensemanager.v1.ConfigurationOrBuilder> + getConfigurationFieldBuilder() { + if (configurationBuilder_ == null) { + configurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.Configuration, + com.google.cloud.licensemanager.v1.Configuration.Builder, + com.google.cloud.licensemanager.v1.ConfigurationOrBuilder>( + getConfiguration(), getParentForChildren(), isClean()); + configuration_ = null; + } + return configurationBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.CreateConfigurationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.CreateConfigurationRequest) + private static final com.google.cloud.licensemanager.v1.CreateConfigurationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.CreateConfigurationRequest(); + } + + public static com.google.cloud.licensemanager.v1.CreateConfigurationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateConfigurationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.CreateConfigurationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/CreateConfigurationRequestOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/CreateConfigurationRequestOrBuilder.java new file mode 100644 index 000000000000..807c8416c6e2 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/CreateConfigurationRequestOrBuilder.java @@ -0,0 +1,179 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface CreateConfigurationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.CreateConfigurationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object
+   * 
+ * + * string configuration_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The configurationId. + */ + java.lang.String getConfigurationId(); + + /** + * + * + *
+   * Required. Id of the requesting object
+   * 
+ * + * string configuration_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for configurationId. + */ + com.google.protobuf.ByteString getConfigurationIdBytes(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the configuration field is set. + */ + boolean hasConfiguration(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The configuration. + */ + com.google.cloud.licensemanager.v1.Configuration getConfiguration(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.licensemanager.v1.ConfigurationOrBuilder getConfigurationOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/DeactivateConfigurationRequest.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/DeactivateConfigurationRequest.java new file mode 100644 index 000000000000..1d0cb155df31 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/DeactivateConfigurationRequest.java @@ -0,0 +1,946 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for deactivating a Configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.DeactivateConfigurationRequest} + */ +public final class DeactivateConfigurationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.DeactivateConfigurationRequest) + DeactivateConfigurationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeactivateConfigurationRequest.newBuilder() to construct. + private DeactivateConfigurationRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeactivateConfigurationRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeactivateConfigurationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_DeactivateConfigurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_DeactivateConfigurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest.class, + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * 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. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest other = + (com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for deactivating a Configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.DeactivateConfigurationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.DeactivateConfigurationRequest) + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_DeactivateConfigurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_DeactivateConfigurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest.class, + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_DeactivateConfigurationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest + getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest build() { + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest buildPartial() { + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest result = + new com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest) { + return mergeFrom((com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest other) { + if (other + == com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.DeactivateConfigurationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.DeactivateConfigurationRequest) + private static final com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest(); + } + + public static com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeactivateConfigurationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/DeactivateConfigurationRequestOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/DeactivateConfigurationRequestOrBuilder.java new file mode 100644 index 000000000000..4e8e393fbb73 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/DeactivateConfigurationRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface DeactivateConfigurationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.DeactivateConfigurationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/DeleteConfigurationRequest.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/DeleteConfigurationRequest.java new file mode 100644 index 000000000000..950698f56c77 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/DeleteConfigurationRequest.java @@ -0,0 +1,940 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for deleting a Configuration
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.DeleteConfigurationRequest} + */ +public final class DeleteConfigurationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.DeleteConfigurationRequest) + DeleteConfigurationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteConfigurationRequest.newBuilder() to construct. + private DeleteConfigurationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteConfigurationRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteConfigurationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_DeleteConfigurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_DeleteConfigurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest.class, + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * 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. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.DeleteConfigurationRequest)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest other = + (com.google.cloud.licensemanager.v1.DeleteConfigurationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.DeleteConfigurationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.DeleteConfigurationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.DeleteConfigurationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.DeleteConfigurationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.DeleteConfigurationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.DeleteConfigurationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.DeleteConfigurationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.DeleteConfigurationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.DeleteConfigurationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.DeleteConfigurationRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.DeleteConfigurationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.DeleteConfigurationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for deleting a Configuration
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.DeleteConfigurationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.DeleteConfigurationRequest) + com.google.cloud.licensemanager.v1.DeleteConfigurationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_DeleteConfigurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_DeleteConfigurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest.class, + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.DeleteConfigurationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_DeleteConfigurationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.DeleteConfigurationRequest + getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.DeleteConfigurationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.DeleteConfigurationRequest build() { + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.DeleteConfigurationRequest buildPartial() { + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest result = + new com.google.cloud.licensemanager.v1.DeleteConfigurationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.licensemanager.v1.DeleteConfigurationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.DeleteConfigurationRequest) { + return mergeFrom((com.google.cloud.licensemanager.v1.DeleteConfigurationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.DeleteConfigurationRequest other) { + if (other + == com.google.cloud.licensemanager.v1.DeleteConfigurationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.DeleteConfigurationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.DeleteConfigurationRequest) + private static final com.google.cloud.licensemanager.v1.DeleteConfigurationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.DeleteConfigurationRequest(); + } + + public static com.google.cloud.licensemanager.v1.DeleteConfigurationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteConfigurationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.DeleteConfigurationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/DeleteConfigurationRequestOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/DeleteConfigurationRequestOrBuilder.java new file mode 100644 index 000000000000..bffd4c84d079 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/DeleteConfigurationRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface DeleteConfigurationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.DeleteConfigurationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetConfigurationRequest.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetConfigurationRequest.java new file mode 100644 index 000000000000..d463dfa3d0b6 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetConfigurationRequest.java @@ -0,0 +1,649 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for getting a Configuration
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.GetConfigurationRequest} + */ +public final class GetConfigurationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.GetConfigurationRequest) + GetConfigurationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetConfigurationRequest.newBuilder() to construct. + private GetConfigurationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetConfigurationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetConfigurationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_GetConfigurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_GetConfigurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.GetConfigurationRequest.class, + com.google.cloud.licensemanager.v1.GetConfigurationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * 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. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.GetConfigurationRequest)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.GetConfigurationRequest other = + (com.google.cloud.licensemanager.v1.GetConfigurationRequest) 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.licensemanager.v1.GetConfigurationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.GetConfigurationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.GetConfigurationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.GetConfigurationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.GetConfigurationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.GetConfigurationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.GetConfigurationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.GetConfigurationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.GetConfigurationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.GetConfigurationRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.GetConfigurationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.GetConfigurationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.GetConfigurationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for getting a Configuration
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.GetConfigurationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.GetConfigurationRequest) + com.google.cloud.licensemanager.v1.GetConfigurationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_GetConfigurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_GetConfigurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.GetConfigurationRequest.class, + com.google.cloud.licensemanager.v1.GetConfigurationRequest.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.GetConfigurationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_GetConfigurationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.GetConfigurationRequest getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.GetConfigurationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.GetConfigurationRequest build() { + com.google.cloud.licensemanager.v1.GetConfigurationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.GetConfigurationRequest buildPartial() { + com.google.cloud.licensemanager.v1.GetConfigurationRequest result = + new com.google.cloud.licensemanager.v1.GetConfigurationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.GetConfigurationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.GetConfigurationRequest) { + return mergeFrom((com.google.cloud.licensemanager.v1.GetConfigurationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.GetConfigurationRequest other) { + if (other == com.google.cloud.licensemanager.v1.GetConfigurationRequest.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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.GetConfigurationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.GetConfigurationRequest) + private static final com.google.cloud.licensemanager.v1.GetConfigurationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.GetConfigurationRequest(); + } + + public static com.google.cloud.licensemanager.v1.GetConfigurationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetConfigurationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.GetConfigurationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetConfigurationRequestOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetConfigurationRequestOrBuilder.java new file mode 100644 index 000000000000..43c6162ae22d --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetConfigurationRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface GetConfigurationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.GetConfigurationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * 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-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetInstanceRequest.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetInstanceRequest.java new file mode 100644 index 000000000000..bda321ea4d69 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetInstanceRequest.java @@ -0,0 +1,649 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for getting a Instance
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.GetInstanceRequest} + */ +public final class GetInstanceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.GetInstanceRequest) + GetInstanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetInstanceRequest.newBuilder() to construct. + private GetInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetInstanceRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetInstanceRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_GetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.GetInstanceRequest.class, + com.google.cloud.licensemanager.v1.GetInstanceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * 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. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.GetInstanceRequest)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.GetInstanceRequest other = + (com.google.cloud.licensemanager.v1.GetInstanceRequest) 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.licensemanager.v1.GetInstanceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.GetInstanceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.GetInstanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.GetInstanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.GetInstanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.GetInstanceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.GetInstanceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.GetInstanceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.GetInstanceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.GetInstanceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.GetInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.GetInstanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.GetInstanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for getting a Instance
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.GetInstanceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.GetInstanceRequest) + com.google.cloud.licensemanager.v1.GetInstanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_GetInstanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.GetInstanceRequest.class, + com.google.cloud.licensemanager.v1.GetInstanceRequest.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.GetInstanceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_GetInstanceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.GetInstanceRequest getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.GetInstanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.GetInstanceRequest build() { + com.google.cloud.licensemanager.v1.GetInstanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.GetInstanceRequest buildPartial() { + com.google.cloud.licensemanager.v1.GetInstanceRequest result = + new com.google.cloud.licensemanager.v1.GetInstanceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.GetInstanceRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.GetInstanceRequest) { + return mergeFrom((com.google.cloud.licensemanager.v1.GetInstanceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.GetInstanceRequest other) { + if (other == com.google.cloud.licensemanager.v1.GetInstanceRequest.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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.GetInstanceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.GetInstanceRequest) + private static final com.google.cloud.licensemanager.v1.GetInstanceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.GetInstanceRequest(); + } + + public static com.google.cloud.licensemanager.v1.GetInstanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInstanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.GetInstanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetInstanceRequestOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetInstanceRequestOrBuilder.java new file mode 100644 index 000000000000..d8596efd04b0 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetInstanceRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface GetInstanceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.GetInstanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * 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-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetProductRequest.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetProductRequest.java new file mode 100644 index 000000000000..4d5545253523 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetProductRequest.java @@ -0,0 +1,648 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for getting a Product
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.GetProductRequest} + */ +public final class GetProductRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.GetProductRequest) + GetProductRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetProductRequest.newBuilder() to construct. + private GetProductRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetProductRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetProductRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_GetProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_GetProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.GetProductRequest.class, + com.google.cloud.licensemanager.v1.GetProductRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * 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. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.GetProductRequest)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.GetProductRequest other = + (com.google.cloud.licensemanager.v1.GetProductRequest) 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.licensemanager.v1.GetProductRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.GetProductRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.GetProductRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.GetProductRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.GetProductRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.GetProductRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.GetProductRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.GetProductRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.GetProductRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.GetProductRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.GetProductRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.GetProductRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.licensemanager.v1.GetProductRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for getting a Product
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.GetProductRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.GetProductRequest) + com.google.cloud.licensemanager.v1.GetProductRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_GetProductRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_GetProductRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.GetProductRequest.class, + com.google.cloud.licensemanager.v1.GetProductRequest.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.GetProductRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_GetProductRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.GetProductRequest getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.GetProductRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.GetProductRequest build() { + com.google.cloud.licensemanager.v1.GetProductRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.GetProductRequest buildPartial() { + com.google.cloud.licensemanager.v1.GetProductRequest result = + new com.google.cloud.licensemanager.v1.GetProductRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.GetProductRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.GetProductRequest) { + return mergeFrom((com.google.cloud.licensemanager.v1.GetProductRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.GetProductRequest other) { + if (other == com.google.cloud.licensemanager.v1.GetProductRequest.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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.GetProductRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.GetProductRequest) + private static final com.google.cloud.licensemanager.v1.GetProductRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.GetProductRequest(); + } + + public static com.google.cloud.licensemanager.v1.GetProductRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetProductRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.GetProductRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetProductRequestOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetProductRequestOrBuilder.java new file mode 100644 index 000000000000..c068e55386cb --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/GetProductRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface GetProductRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.GetProductRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * 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-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/Instance.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/Instance.java new file mode 100644 index 000000000000..d8861c106381 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/Instance.java @@ -0,0 +1,3198 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/api_entities.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message describing Instance object
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.Instance} + */ +public final class Instance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.Instance) + InstanceOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Instance.newBuilder() to construct. + private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Instance() { + name_ = ""; + state_ = 0; + region_ = ""; + licenseVersionId_ = ""; + computeInstance_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Instance(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Instance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 7: + return internalGetProductActivation(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.Instance.class, + com.google.cloud.licensemanager.v1.Instance.Builder.class); + } + + /** + * + * + *
+   * VM status enum.
+   * 
+ * + * Protobuf enum {@code google.cloud.licensemanager.v1.Instance.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The Status of the VM is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Resources are being allocated for the instance.
+     * 
+ * + * PROVISIONING = 1; + */ + PROVISIONING(1), + /** + * + * + *
+     * All required resources have been allocated and
+     * the instance is being started.
+     * 
+ * + * STAGING = 2; + */ + STAGING(2), + /** + * + * + *
+     * The instance is running.
+     * 
+ * + * RUNNING = 3; + */ + RUNNING(3), + /** + * + * + *
+     * The instance is currently stopping (either being deleted or terminated).
+     * 
+ * + * STOPPING = 4; + */ + STOPPING(4), + /** + * + * + *
+     * The instance has stopped due to various reasons (user request, VM
+     * preemption, project freezing, etc.).
+     * 
+ * + * STOPPED = 5; + */ + STOPPED(5), + /** + * + * + *
+     * The instance has failed in some way.
+     * 
+ * + * TERMINATED = 6; + */ + TERMINATED(6), + /** + * + * + *
+     * The instance is in repair.
+     * 
+ * + * REPAIRING = 7; + */ + REPAIRING(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The Status of the VM is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Resources are being allocated for the instance.
+     * 
+ * + * PROVISIONING = 1; + */ + public static final int PROVISIONING_VALUE = 1; + + /** + * + * + *
+     * All required resources have been allocated and
+     * the instance is being started.
+     * 
+ * + * STAGING = 2; + */ + public static final int STAGING_VALUE = 2; + + /** + * + * + *
+     * The instance is running.
+     * 
+ * + * RUNNING = 3; + */ + public static final int RUNNING_VALUE = 3; + + /** + * + * + *
+     * The instance is currently stopping (either being deleted or terminated).
+     * 
+ * + * STOPPING = 4; + */ + public static final int STOPPING_VALUE = 4; + + /** + * + * + *
+     * The instance has stopped due to various reasons (user request, VM
+     * preemption, project freezing, etc.).
+     * 
+ * + * STOPPED = 5; + */ + public static final int STOPPED_VALUE = 5; + + /** + * + * + *
+     * The instance has failed in some way.
+     * 
+ * + * TERMINATED = 6; + */ + public static final int TERMINATED_VALUE = 6; + + /** + * + * + *
+     * The instance is in repair.
+     * 
+ * + * REPAIRING = 7; + */ + public static final int REPAIRING_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return PROVISIONING; + case 2: + return STAGING; + case 3: + return RUNNING; + case 4: + return STOPPING; + case 5: + return STOPPED; + case 6: + return TERMINATED; + case 7: + return REPAIRING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.Instance.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.licensemanager.v1.Instance.State) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. name of resource
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. name of resource
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Instance_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The state of the VM.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. The state of the VM.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.Instance.State getState() { + com.google.cloud.licensemanager.v1.Instance.State result = + com.google.cloud.licensemanager.v1.Instance.State.forNumber(state_); + return result == null ? com.google.cloud.licensemanager.v1.Instance.State.UNRECOGNIZED : result; + } + + public static final int REGION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object region_ = ""; + + /** + * + * + *
+   * Output only. The location of the VM.
+   * 
+ * + * string region = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The location of the VM.
+   * 
+ * + * string region = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_ACTIVATION_FIELD_NUMBER = 7; + + private static final class ProductActivationDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Instance_ProductActivationEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.ENUM, + com.google.cloud.licensemanager.v1.ActivationState.ACTIVATION_STATE_UNSPECIFIED + .getNumber()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField productActivation_; + + private com.google.protobuf.MapField + internalGetProductActivation() { + if (productActivation_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ProductActivationDefaultEntryHolder.defaultEntry); + } + return productActivation_; + } + + private static final com.google.protobuf.Internal.MapAdapter.Converter< + java.lang.Integer, com.google.cloud.licensemanager.v1.ActivationState> + productActivationValueConverter = + com.google.protobuf.Internal.MapAdapter.newEnumConverter( + com.google.cloud.licensemanager.v1.ActivationState.internalGetValueMap(), + com.google.cloud.licensemanager.v1.ActivationState.UNRECOGNIZED); + + private static final java.util.Map< + java.lang.String, com.google.cloud.licensemanager.v1.ActivationState> + internalGetAdaptedProductActivationMap( + java.util.Map map) { + return new com.google.protobuf.Internal.MapAdapter< + java.lang.String, com.google.cloud.licensemanager.v1.ActivationState, java.lang.Integer>( + map, productActivationValueConverter); + } + + public int getProductActivationCount() { + return internalGetProductActivation().getMap().size(); + } + + /** + * + * + *
+   * Output only. Map with Product_Name and Activation State of the VM.
+   * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsProductActivation(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetProductActivation().getMap().containsKey(key); + } + + /** Use {@link #getProductActivationMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getProductActivation() { + return getProductActivationMap(); + } + + /** + * + * + *
+   * Output only. Map with Product_Name and Activation State of the VM.
+   * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getProductActivationMap() { + return internalGetAdaptedProductActivationMap(internalGetProductActivation().getMap()); + } + + /** + * + * + *
+   * Output only. Map with Product_Name and Activation State of the VM.
+   * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.licensemanager.v1.ActivationState + getProductActivationOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.licensemanager.v1.ActivationState defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetProductActivation().getMap(); + return map.containsKey(key) + ? productActivationValueConverter.doForward(map.get(key)) + : defaultValue; + } + + /** + * + * + *
+   * Output only. Map with Product_Name and Activation State of the VM.
+   * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.ActivationState getProductActivationOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetProductActivation().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return productActivationValueConverter.doForward(map.get(key)); + } + + /** Use {@link #getProductActivationValueMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getProductActivationValue() { + return getProductActivationValueMap(); + } + + /** + * + * + *
+   * Output only. Map with Product_Name and Activation State of the VM.
+   * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getProductActivationValueMap() { + return internalGetProductActivation().getMap(); + } + + /** + * + * + *
+   * Output only. Map with Product_Name and Activation State of the VM.
+   * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getProductActivationValueOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetProductActivation().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Output only. Map with Product_Name and Activation State of the VM.
+   * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getProductActivationValueOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetProductActivation().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int LICENSE_VERSION_ID_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object licenseVersionId_ = ""; + + /** + * + * + *
+   * Output only. license version id.
+   * 
+ * + * string license_version_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The licenseVersionId. + */ + @java.lang.Override + public java.lang.String getLicenseVersionId() { + java.lang.Object ref = licenseVersionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + licenseVersionId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. license version id.
+   * 
+ * + * string license_version_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for licenseVersionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLicenseVersionIdBytes() { + java.lang.Object ref = licenseVersionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + licenseVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMPUTE_INSTANCE_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object computeInstance_ = ""; + + /** + * + * + *
+   * Required. Compute Instance resource name, i.e.
+   * projects/{project}/zones/{zone}/instances/{instance}
+   * 
+ * + * + * string compute_instance = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The computeInstance. + */ + @java.lang.Override + public java.lang.String getComputeInstance() { + java.lang.Object ref = computeInstance_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + computeInstance_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Compute Instance resource name, i.e.
+   * projects/{project}/zones/{zone}/instances/{instance}
+   * 
+ * + * + * string compute_instance = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for computeInstance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getComputeInstanceBytes() { + java.lang.Object ref = computeInstance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + computeInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (state_ != com.google.cloud.licensemanager.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, region_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetProductActivation(), + ProductActivationDefaultEntryHolder.defaultEntry, + 7); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(licenseVersionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, licenseVersionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(computeInstance_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, computeInstance_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (state_ != com.google.cloud.licensemanager.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, region_); + } + for (java.util.Map.Entry entry : + internalGetProductActivation().getMap().entrySet()) { + com.google.protobuf.MapEntry productActivation__ = + ProductActivationDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, productActivation__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(licenseVersionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, licenseVersionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(computeInstance_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, computeInstance_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.Instance)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.Instance other = + (com.google.cloud.licensemanager.v1.Instance) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (state_ != other.state_) return false; + if (!getRegion().equals(other.getRegion())) return false; + if (!internalGetProductActivation().equals(other.internalGetProductActivation())) return false; + if (!getLicenseVersionId().equals(other.getLicenseVersionId())) return false; + if (!getComputeInstance().equals(other.getComputeInstance())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + if (!internalGetProductActivation().getMap().isEmpty()) { + hash = (37 * hash) + PRODUCT_ACTIVATION_FIELD_NUMBER; + hash = (53 * hash) + internalGetProductActivation().hashCode(); + } + hash = (37 * hash) + LICENSE_VERSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getLicenseVersionId().hashCode(); + hash = (37 * hash) + COMPUTE_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getComputeInstance().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.Instance parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.Instance parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Instance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.Instance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Instance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.Instance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Instance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.Instance parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Instance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.Instance parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Instance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.Instance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.licensemanager.v1.Instance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message describing Instance object
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.Instance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.Instance) + com.google.cloud.licensemanager.v1.InstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Instance_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 7: + return internalGetProductActivation(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + case 7: + return internalGetMutableProductActivation(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.Instance.class, + com.google.cloud.licensemanager.v1.Instance.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.Instance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + state_ = 0; + region_ = ""; + internalGetMutableProductActivation().clear(); + licenseVersionId_ = ""; + computeInstance_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Instance_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.Instance getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.Instance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.Instance build() { + com.google.cloud.licensemanager.v1.Instance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.Instance buildPartial() { + com.google.cloud.licensemanager.v1.Instance result = + new com.google.cloud.licensemanager.v1.Instance(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.Instance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.region_ = region_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.productActivation_ = internalGetProductActivation(); + result.productActivation_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.licenseVersionId_ = licenseVersionId_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.computeInstance_ = computeInstance_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.Instance) { + return mergeFrom((com.google.cloud.licensemanager.v1.Instance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.Instance other) { + if (other == com.google.cloud.licensemanager.v1.Instance.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getRegion().isEmpty()) { + region_ = other.region_; + bitField0_ |= 0x00000020; + onChanged(); + } + internalGetMutableProductActivation().mergeFrom(other.internalGetProductActivation()); + bitField0_ |= 0x00000040; + if (!other.getLicenseVersionId().isEmpty()) { + licenseVersionId_ = other.licenseVersionId_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getComputeInstance().isEmpty()) { + computeInstance_ = other.computeInstance_; + bitField0_ |= 0x00000100; + 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: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + com.google.protobuf.MapEntry + productActivation__ = + input.readMessage( + ProductActivationDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableProductActivation() + .getMutableMap() + .put(productActivation__.getKey(), productActivation__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + licenseVersionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + computeInstance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. name of resource
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. name of resource
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. name of resource
+     * 
+ * + * 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. name of resource
+     * 
+ * + * 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. name of resource
+     * 
+ * + * 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 com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. [Output only] Create time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. [Output only] Update time stamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The state of the VM.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. The state of the VM.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The state of the VM.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.Instance.State getState() { + com.google.cloud.licensemanager.v1.Instance.State result = + com.google.cloud.licensemanager.v1.Instance.State.forNumber(state_); + return result == null + ? com.google.cloud.licensemanager.v1.Instance.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The state of the VM.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.licensemanager.v1.Instance.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The state of the VM.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000010); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object region_ = ""; + + /** + * + * + *
+     * Output only. The location of the VM.
+     * 
+ * + * string region = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The location of the VM.
+     * 
+ * + * string region = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for region. + */ + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The location of the VM.
+     * 
+ * + * string region = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + region_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The location of the VM.
+     * 
+ * + * string region = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRegion() { + region_ = getDefaultInstance().getRegion(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The location of the VM.
+     * 
+ * + * string region = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + region_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.MapField productActivation_; + + private com.google.protobuf.MapField + internalGetProductActivation() { + if (productActivation_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ProductActivationDefaultEntryHolder.defaultEntry); + } + return productActivation_; + } + + private com.google.protobuf.MapField + internalGetMutableProductActivation() { + if (productActivation_ == null) { + productActivation_ = + com.google.protobuf.MapField.newMapField( + ProductActivationDefaultEntryHolder.defaultEntry); + } + if (!productActivation_.isMutable()) { + productActivation_ = productActivation_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return productActivation_; + } + + public int getProductActivationCount() { + return internalGetProductActivation().getMap().size(); + } + + /** + * + * + *
+     * Output only. Map with Product_Name and Activation State of the VM.
+     * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsProductActivation(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetProductActivation().getMap().containsKey(key); + } + + /** Use {@link #getProductActivationMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getProductActivation() { + return getProductActivationMap(); + } + + /** + * + * + *
+     * Output only. Map with Product_Name and Activation State of the VM.
+     * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getProductActivationMap() { + return internalGetAdaptedProductActivationMap(internalGetProductActivation().getMap()); + } + + /** + * + * + *
+     * Output only. Map with Product_Name and Activation State of the VM.
+     * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.licensemanager.v1.ActivationState + getProductActivationOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.licensemanager.v1.ActivationState defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetProductActivation().getMap(); + return map.containsKey(key) + ? productActivationValueConverter.doForward(map.get(key)) + : defaultValue; + } + + /** + * + * + *
+     * Output only. Map with Product_Name and Activation State of the VM.
+     * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.ActivationState getProductActivationOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetProductActivation().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return productActivationValueConverter.doForward(map.get(key)); + } + + /** Use {@link #getProductActivationValueMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getProductActivationValue() { + return getProductActivationValueMap(); + } + + /** + * + * + *
+     * Output only. Map with Product_Name and Activation State of the VM.
+     * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getProductActivationValueMap() { + return internalGetProductActivation().getMap(); + } + + /** + * + * + *
+     * Output only. Map with Product_Name and Activation State of the VM.
+     * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getProductActivationValueOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetProductActivation().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Output only. Map with Product_Name and Activation State of the VM.
+     * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getProductActivationValueOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetProductActivation().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearProductActivation() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableProductActivation().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Output only. Map with Product_Name and Activation State of the VM.
+     * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeProductActivation(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableProductActivation().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableProductActivation() { + bitField0_ |= 0x00000040; + return internalGetAdaptedProductActivationMap( + internalGetMutableProductActivation().getMutableMap()); + } + + /** + * + * + *
+     * Output only. Map with Product_Name and Activation State of the VM.
+     * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putProductActivation( + java.lang.String key, com.google.cloud.licensemanager.v1.ActivationState value) { + if (key == null) { + throw new NullPointerException("map key"); + } + + internalGetMutableProductActivation() + .getMutableMap() + .put(key, productActivationValueConverter.doBackward(value)); + bitField0_ |= 0x00000040; + return this; + } + + /** + * + * + *
+     * Output only. Map with Product_Name and Activation State of the VM.
+     * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllProductActivation( + java.util.Map + values) { + internalGetAdaptedProductActivationMap(internalGetMutableProductActivation().getMutableMap()) + .putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableProductActivationValue() { + bitField0_ |= 0x00000040; + return internalGetMutableProductActivation().getMutableMap(); + } + + /** + * + * + *
+     * Output only. Map with Product_Name and Activation State of the VM.
+     * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putProductActivationValue(java.lang.String key, int value) { + if (key == null) { + throw new NullPointerException("map key"); + } + + internalGetMutableProductActivation().getMutableMap().put(key, value); + bitField0_ |= 0x00000040; + return this; + } + + /** + * + * + *
+     * Output only. Map with Product_Name and Activation State of the VM.
+     * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllProductActivationValue( + java.util.Map values) { + internalGetMutableProductActivation().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + private java.lang.Object licenseVersionId_ = ""; + + /** + * + * + *
+     * Output only. license version id.
+     * 
+ * + * string license_version_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The licenseVersionId. + */ + public java.lang.String getLicenseVersionId() { + java.lang.Object ref = licenseVersionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + licenseVersionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. license version id.
+     * 
+ * + * string license_version_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for licenseVersionId. + */ + public com.google.protobuf.ByteString getLicenseVersionIdBytes() { + java.lang.Object ref = licenseVersionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + licenseVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. license version id.
+     * 
+ * + * string license_version_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The licenseVersionId to set. + * @return This builder for chaining. + */ + public Builder setLicenseVersionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + licenseVersionId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. license version id.
+     * 
+ * + * string license_version_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLicenseVersionId() { + licenseVersionId_ = getDefaultInstance().getLicenseVersionId(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. license version id.
+     * 
+ * + * string license_version_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for licenseVersionId to set. + * @return This builder for chaining. + */ + public Builder setLicenseVersionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + licenseVersionId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object computeInstance_ = ""; + + /** + * + * + *
+     * Required. Compute Instance resource name, i.e.
+     * projects/{project}/zones/{zone}/instances/{instance}
+     * 
+ * + * + * string compute_instance = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The computeInstance. + */ + public java.lang.String getComputeInstance() { + java.lang.Object ref = computeInstance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + computeInstance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Compute Instance resource name, i.e.
+     * projects/{project}/zones/{zone}/instances/{instance}
+     * 
+ * + * + * string compute_instance = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for computeInstance. + */ + public com.google.protobuf.ByteString getComputeInstanceBytes() { + java.lang.Object ref = computeInstance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + computeInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Compute Instance resource name, i.e.
+     * projects/{project}/zones/{zone}/instances/{instance}
+     * 
+ * + * + * string compute_instance = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The computeInstance to set. + * @return This builder for chaining. + */ + public Builder setComputeInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + computeInstance_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Compute Instance resource name, i.e.
+     * projects/{project}/zones/{zone}/instances/{instance}
+     * 
+ * + * + * string compute_instance = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearComputeInstance() { + computeInstance_ = getDefaultInstance().getComputeInstance(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Compute Instance resource name, i.e.
+     * projects/{project}/zones/{zone}/instances/{instance}
+     * 
+ * + * + * string compute_instance = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for computeInstance to set. + * @return This builder for chaining. + */ + public Builder setComputeInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + computeInstance_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.Instance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.Instance) + private static final com.google.cloud.licensemanager.v1.Instance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.Instance(); + } + + public static com.google.cloud.licensemanager.v1.Instance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Instance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.Instance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/InstanceName.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/InstanceName.java new file mode 100644 index 000000000000..4a5d32082369 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/InstanceName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class InstanceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_INSTANCE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/instances/{instance}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String instance; + + @Deprecated + protected InstanceName() { + project = null; + location = null; + instance = null; + } + + private InstanceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + instance = Preconditions.checkNotNull(builder.getInstance()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InstanceName of(String project, String location, String instance) { + return newBuilder().setProject(project).setLocation(location).setInstance(instance).build(); + } + + public static String format(String project, String location, String instance) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .build() + .toString(); + } + + public static InstanceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_INSTANCE.validatedMatch( + formattedString, "InstanceName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("instance")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (InstanceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_INSTANCE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_INSTANCE.instantiate( + "project", project, "location", location, "instance", instance); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + InstanceName that = ((InstanceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.instance, that.instance); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(instance); + return h; + } + + /** Builder for projects/{project}/locations/{location}/instances/{instance}. */ + public static class Builder { + private String project; + private String location; + private String instance; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + private Builder(InstanceName instanceName) { + this.project = instanceName.project; + this.location = instanceName.location; + this.instance = instanceName.instance; + } + + public InstanceName build() { + return new InstanceName(this); + } + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/InstanceOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/InstanceOrBuilder.java new file mode 100644 index 000000000000..8bf2711fabca --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/InstanceOrBuilder.java @@ -0,0 +1,428 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/api_entities.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface InstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.Instance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. name of resource
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. name of resource
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. [Output only] Create time stamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. [Output only] Update time stamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The state of the VM.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The state of the VM.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.licensemanager.v1.Instance.State getState(); + + /** + * + * + *
+   * Output only. The location of the VM.
+   * 
+ * + * string region = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The region. + */ + java.lang.String getRegion(); + + /** + * + * + *
+   * Output only. The location of the VM.
+   * 
+ * + * string region = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for region. + */ + com.google.protobuf.ByteString getRegionBytes(); + + /** + * + * + *
+   * Output only. Map with Product_Name and Activation State of the VM.
+   * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getProductActivationCount(); + + /** + * + * + *
+   * Output only. Map with Product_Name and Activation State of the VM.
+   * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsProductActivation(java.lang.String key); + + /** Use {@link #getProductActivationMap()} instead. */ + @java.lang.Deprecated + java.util.Map + getProductActivation(); + + /** + * + * + *
+   * Output only. Map with Product_Name and Activation State of the VM.
+   * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map + getProductActivationMap(); + + /** + * + * + *
+   * Output only. Map with Product_Name and Activation State of the VM.
+   * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + /* nullable */ + com.google.cloud.licensemanager.v1.ActivationState getProductActivationOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.licensemanager.v1.ActivationState defaultValue); + + /** + * + * + *
+   * Output only. Map with Product_Name and Activation State of the VM.
+   * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.licensemanager.v1.ActivationState getProductActivationOrThrow( + java.lang.String key); + + /** Use {@link #getProductActivationValueMap()} instead. */ + @java.lang.Deprecated + java.util.Map getProductActivationValue(); + + /** + * + * + *
+   * Output only. Map with Product_Name and Activation State of the VM.
+   * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map getProductActivationValueMap(); + + /** + * + * + *
+   * Output only. Map with Product_Name and Activation State of the VM.
+   * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getProductActivationValueOrDefault(java.lang.String key, int defaultValue); + + /** + * + * + *
+   * Output only. Map with Product_Name and Activation State of the VM.
+   * 
+ * + * + * map<string, .google.cloud.licensemanager.v1.ActivationState> product_activation = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getProductActivationValueOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. license version id.
+   * 
+ * + * string license_version_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The licenseVersionId. + */ + java.lang.String getLicenseVersionId(); + + /** + * + * + *
+   * Output only. license version id.
+   * 
+ * + * string license_version_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for licenseVersionId. + */ + com.google.protobuf.ByteString getLicenseVersionIdBytes(); + + /** + * + * + *
+   * Required. Compute Instance resource name, i.e.
+   * projects/{project}/zones/{zone}/instances/{instance}
+   * 
+ * + * + * string compute_instance = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The computeInstance. + */ + java.lang.String getComputeInstance(); + + /** + * + * + *
+   * Required. Compute Instance resource name, i.e.
+   * projects/{project}/zones/{zone}/instances/{instance}
+   * 
+ * + * + * string compute_instance = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for computeInstance. + */ + com.google.protobuf.ByteString getComputeInstanceBytes(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/LicenseManagerProto.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/LicenseManagerProto.java new file mode 100644 index 000000000000..ab14969b7815 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/LicenseManagerProto.java @@ -0,0 +1,486 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public final class LicenseManagerProto { + private LicenseManagerProto() {} + + 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_licensemanager_v1_ListConfigurationsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_ListConfigurationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_ListConfigurationsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_ListConfigurationsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_GetConfigurationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_GetConfigurationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_CreateConfigurationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_CreateConfigurationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_UpdateConfigurationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_UpdateConfigurationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_DeleteConfigurationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_DeleteConfigurationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_ListInstancesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_ListInstancesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_ListInstancesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_ListInstancesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_GetInstanceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_GetInstanceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_DeactivateConfigurationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_DeactivateConfigurationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_ReactivateConfigurationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_ReactivateConfigurationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_AggregateUsageRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_AggregateUsageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_AggregateUsageResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_AggregateUsageResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_ListProductsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_ListProductsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_ListProductsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_ListProductsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_GetProductRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_GetProductRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_licensemanager_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_licensemanager_v1_OperationMetadata_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/licensemanager/v1/licensemanager.proto\022\036google.cloud.licensemanag" + + "er.v1\032\034google/api/annotations.proto\032\027goo" + + "gle/api/client.proto\032\037google/api/field_b" + + "ehavior.proto\032\033google/api/field_info.pro" + + "to\032\031google/api/resource.proto\0321google/cl" + + "oud/licensemanager/v1/api_entities.proto" + + "\032#google/longrunning/operations.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\275\001\n" + + "\031ListConfigurationsRequest\022C\n" + + "\006parent\030\001 \001(" + + "\tB3\340A\002\372A-\022+licensemanager.googleapis.com/Configuration\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\221\001\n" + + "\032ListConfigurationsResponse\022E\n" + + "\016configurations\030\001" + + " \003(\0132-.google.cloud.licensemanager.v1.Configuration\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\\\n" + + "\027GetConfigurationRequest\022A\n" + + "\004name\030\001 \001(\tB3\340A\002\372A-\n" + + "+licensemanager.googleapis.com/Configuration\"\354\001\n" + + "\032CreateConfigurationRequest\022C\n" + + "\006parent\030\001 \001(" + + "\tB3\340A\002\372A-\022+licensemanager.googleapis.com/Configuration\022\035\n" + + "\020configuration_id\030\002 \001(\tB\003\340A\002\022I\n\r" + + "configuration\030\003 \001(" + + "\0132-.google.cloud.licensemanager.v1.ConfigurationB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\276\001\n" + + "\032UpdateConfigurationRequest\0224\n" + + "\013update_mask\030\001" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022I\n\r" + + "configuration\030\002 \001(\0132-.goo" + + "gle.cloud.licensemanager.v1.ConfigurationB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\200\001\n" + + "\032DeleteConfigurationRequest\022A\n" + + "\004name\030\001 \001(\tB3\340A\002\372A-\n" + + "+licensemanager.googleapis.com/Configuration\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\263\001\n" + + "\024ListInstancesRequest\022>\n" + + "\006parent\030\001 \001(" + + "\tB.\340A\002\372A(\022&licensemanager.googleapis.com/Instance\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\202\001\n" + + "\025ListInstancesResponse\022;\n" + + "\tinstances\030\001 \003(\0132(.google.cloud.licensemanager.v1.Instance\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"R\n" + + "\022GetInstanceRequest\022<\n" + + "\004name\030\001 \001(\tB.\340A\002\372A(\n" + + "&licensemanager.googleapis.com/Instance\"\322\001\n" + + "%QueryConfigurationLicenseUsageRequest\022A\n" + + "\004name\030\001 \001(\tB3\340A\002\372A-\n" + + "+licensemanager.googleapis.com/Configuration\0223\n\n" + + "start_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\002\0221\n" + + "\010end_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\002\"\177\n" + + "&QueryConfigurationLicenseUsageResponse\022J\n" + + "\020user_count_usage\030\001" + + " \001(\0132..google.cloud.licensemanager.v1.UserCountUsageH\000B\t\n" + + "\007details\"\204\001\n" + + "\036DeactivateConfigurationRequest\022A\n" + + "\004name\030\001 \001(\tB3\340A\002\372A-\n" + + "+licensemanager.googleapis.com/Configuration\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\204\001\n" + + "\036ReactivateConfigurationRequest\022A\n" + + "\004name\030\001 \001(\tB3\340A\002\372A-\n" + + "+licensemanager.googleapis.com/Configuration\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\237\002\n" + + "\025AggregateUsageRequest\022A\n" + + "\004name\030\001 \001(\tB3\340A\002\372A-\n" + + "+licensemanager.googleapis.com/Configuration\022\026\n" + + "\tpage_size\030\003 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\004 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\005 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\006 \001(\tB\003\340A\001\0223\n\n" + + "start_time\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\002\0221\n" + + "\010end_time\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340A\002\"}\n" + + "\026AggregateUsageResponse\0225\n" + + "\006usages\030\001 \003(\0132%.google.cloud.licensemanager.v1.Usage\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\261\001\n" + + "\023ListProductsRequest\022=\n" + + "\006parent\030\001 \001(\tB-" + + "\340A\002\372A\'\022%licensemanager.googleapis.com/Product\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\177\n" + + "\024ListProductsResponse\0229\n" + + "\010products\030\001 \003(\0132\'.google.cloud.licensemanager.v1.Product\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"P\n" + + "\021GetProductRequest\022;\n" + + "\004name\030\001 \001(\tB-\340A\002\372A\'\n" + + "%licensemanager.googleapis.com/Product\"\200\002\n" + + "\021OperationMetadata\0224\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + + "\010end_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\023\n" + + "\006target\030\003 \001(\tB\003\340A\003\022\021\n" + + "\004verb\030\004 \001(\tB\003\340A\003\022\033\n" + + "\016status_message\030\005 \001(\tB\003\340A\003\022#\n" + + "\026requested_cancellation\030\006 \001(\010B\003\340A\003\022\030\n" + + "\013api_version\030\007 \001(\tB\003\340A\0032\246\027\n" + + "\016LicenseManager\022\320\001\n" + + "\022ListConfigurations\0229.google.cloud.licensemanager" + + ".v1.ListConfigurationsRequest\032:.google.cloud.licensemanager.v1.ListConfiguration" + + "sResponse\"C\332A\006parent\202\323\344\223\0024\0222/v1/{parent=" + + "projects/*/locations/*}/configurations\022\275\001\n" + + "\020GetConfiguration\0227.google.cloud.licen" + + "semanager.v1.GetConfigurationRequest\032-.google.cloud.licensemanager.v1.Configurat" + + "ion\"A\332A\004name\202\323\344\223\0024\0222/v1/{name=projects/*/locations/*/configurations/*}\022\211\002\n" + + "\023CreateConfiguration\022:.google.cloud.licenseman" + + "ager.v1.CreateConfigurationRequest\032\035.google.longrunning.Operation\"\226\001\312A\"\n\r" + + "Configuration\022\021OperationMetadata\332A%parent,confi" + + "guration,configuration_id\202\323\344\223\002C\"2/v1/{pa" + + "rent=projects/*/locations/*}/configurations:\r" + + "configuration\022\213\002\n" + + "\023UpdateConfiguration\022:.google.cloud.licensemanager.v1.Upda" + + "teConfigurationRequest\032\035.google.longrunning.Operation\"\230\001\312A\"\n\r" + + "Configuration\022\021OperationMetadata\332A\031configuration,update_mas" + + "k\202\323\344\223\002Q2@/v1/{configuration.name=projects/*/locations/*/configurations/*}:\r" + + "configuration\022\340\001\n" + + "\023DeleteConfiguration\022:.google.cloud.licensemanager.v1.DeleteConfigur" + + "ationRequest\032\035.google.longrunning.Operation\"n\312A*\n" + + "\025google.protobuf.Empty\022\021Operati" + + "onMetadata\332A\004name\202\323\344\223\0024*2/v1/{name=projects/*/locations/*/configurations/*}\022\274\001\n\r" + + "ListInstances\0224.google.cloud.licensemanager.v1.ListInstancesRequest\0325.google.clo" + + "ud.licensemanager.v1.ListInstancesRespon" + + "se\">\332A\006parent\202\323\344\223\002/\022-/v1/{parent=projects/*/locations/*}/instances\022\251\001\n" + + "\013GetInstance\0222.google.cloud.licensemanager.v1.GetI" + + "nstanceRequest\032(.google.cloud.licenseman" + + "ager.v1.Instance\"<\332A\004name\202\323\344\223\002/\022-/v1/{na" + + "me=projects/*/locations/*/instances/*}\022\356\001\n" + + "\027DeactivateConfiguration\022>.google.cloud.licensemanager.v1.DeactivateConfigurat" + + "ionRequest\032\035.google.longrunning.Operation\"t\312A\"\n\r" + + "Configuration\022\021OperationMetadata" + + "\332A\004name\202\323\344\223\002B\"=/v1/{name=projects/*/loca" + + "tions/*/configurations/*}:deactivate:\001*\022\356\001\n" + + "\027ReactivateConfiguration\022>.google.cloud.licensemanager.v1.ReactivateConfigura" + + "tionRequest\032\035.google.longrunning.Operation\"t\312A\"\n\r" + + "Configuration\022\021OperationMetadat" + + "a\332A\004name\202\323\344\223\002B\"=/v1/{name=projects/*/loc" + + "ations/*/configurations/*}:reactivate:\001*\022\230\002\n" + + "\036QueryConfigurationLicenseUsage\022E.google.cloud.licensemanager.v1.QueryConfig" + + "urationLicenseUsageRequest\032F.google.cloud.licensemanager.v1.QueryConfigurationLi" + + "censeUsageResponse\"g\332A\030name,start_time,e" + + "nd_time\202\323\344\223\002F\022D/v1/{name=projects/*/loca" + + "tions/*/configurations/*}:queryLicenseUsage\022\345\001\n" + + "\016AggregateUsage\0225.google.cloud.licensemanager.v1.AggregateUsageRequest\0326." + + "google.cloud.licensemanager.v1.Aggregate" + + "UsageResponse\"d\332A\030name,start_time,end_ti" + + "me\202\323\344\223\002C\022A/v1/{name=projects/*/locations/*/configurations/*}:aggregateUsage\022\270\001\n" + + "\014ListProducts\0223.google.cloud.licensemanag" + + "er.v1.ListProductsRequest\0324.google.cloud.licensemanager.v1.ListProductsResponse\"" + + "=\332A\006parent\202\323\344\223\002.\022,/v1/{parent=projects/*/locations/*}/products\022\245\001\n\n" + + "GetProduct\0221.google.cloud.licensemanager.v1.GetProduc" + + "tRequest\032\'.google.cloud.licensemanager.v" + + "1.Product\";\332A\004name\202\323\344\223\002.\022,/v1/{name=proj" + + "ects/*/locations/*/products/*}\032Q\312A\035licen" + + "semanager.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\316\002\n" + + "\"com.google.cloud.licensemanager.v1B\023Licens" + + "eManagerProtoP\001ZJcloud.google.com/go/licensemanager/apiv1/licensemanagerpb;licen" + + "semanagerpb\252\002\036Google.Cloud.LicenseManage" + + "r.V1\312\002\036Google\\Cloud\\LicenseManager\\V1\352\002!Google::Cloud::LicenseManager::V1\352A^\n" + + "&compute.googleapis.com/ComputeInstance\0224projects/{project}/zones/{zone}/instances/" + + "{instance}b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.licensemanager.v1.ApiEntitiesProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_licensemanager_v1_ListConfigurationsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_licensemanager_v1_ListConfigurationsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_ListConfigurationsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_licensemanager_v1_ListConfigurationsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_licensemanager_v1_ListConfigurationsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_ListConfigurationsResponse_descriptor, + new java.lang.String[] { + "Configurations", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_licensemanager_v1_GetConfigurationRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_licensemanager_v1_GetConfigurationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_GetConfigurationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_licensemanager_v1_CreateConfigurationRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_licensemanager_v1_CreateConfigurationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_CreateConfigurationRequest_descriptor, + new java.lang.String[] { + "Parent", "ConfigurationId", "Configuration", "RequestId", + }); + internal_static_google_cloud_licensemanager_v1_UpdateConfigurationRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_licensemanager_v1_UpdateConfigurationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_UpdateConfigurationRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Configuration", "RequestId", + }); + internal_static_google_cloud_licensemanager_v1_DeleteConfigurationRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_licensemanager_v1_DeleteConfigurationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_DeleteConfigurationRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_licensemanager_v1_ListInstancesRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_licensemanager_v1_ListInstancesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_ListInstancesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_licensemanager_v1_ListInstancesResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_licensemanager_v1_ListInstancesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_ListInstancesResponse_descriptor, + new java.lang.String[] { + "Instances", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_licensemanager_v1_GetInstanceRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_licensemanager_v1_GetInstanceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_GetInstanceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageRequest_descriptor, + new java.lang.String[] { + "Name", "StartTime", "EndTime", + }); + internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageResponse_descriptor, + new java.lang.String[] { + "UserCountUsage", "Details", + }); + internal_static_google_cloud_licensemanager_v1_DeactivateConfigurationRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_licensemanager_v1_DeactivateConfigurationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_DeactivateConfigurationRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_licensemanager_v1_ReactivateConfigurationRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_licensemanager_v1_ReactivateConfigurationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_ReactivateConfigurationRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_licensemanager_v1_AggregateUsageRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_licensemanager_v1_AggregateUsageRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_AggregateUsageRequest_descriptor, + new java.lang.String[] { + "Name", "PageSize", "PageToken", "Filter", "OrderBy", "StartTime", "EndTime", + }); + internal_static_google_cloud_licensemanager_v1_AggregateUsageResponse_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_licensemanager_v1_AggregateUsageResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_AggregateUsageResponse_descriptor, + new java.lang.String[] { + "Usages", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_licensemanager_v1_ListProductsRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_licensemanager_v1_ListProductsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_ListProductsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_licensemanager_v1_ListProductsResponse_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_licensemanager_v1_ListProductsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_ListProductsResponse_descriptor, + new java.lang.String[] { + "Products", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_licensemanager_v1_GetProductRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_licensemanager_v1_GetProductRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_GetProductRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_licensemanager_v1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_licensemanager_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_licensemanager_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "CreateTime", + "EndTime", + "Target", + "Verb", + "StatusMessage", + "RequestedCancellation", + "ApiVersion", + }); + 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.FieldInfoProto.fieldInfo); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.licensemanager.v1.ApiEntitiesProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/LicenseType.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/LicenseType.java new file mode 100644 index 000000000000..cac2b1f5212e --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/LicenseType.java @@ -0,0 +1,181 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/api_entities.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Different types of licenses that are supported.
+ * 
+ * + * Protobuf enum {@code google.cloud.licensemanager.v1.LicenseType} + */ +public enum LicenseType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * unspecified.
+   * 
+ * + * LICENSE_TYPE_UNSPECIFIED = 0; + */ + LICENSE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Billing will be based on number of users listed per month.
+   * 
+ * + * LICENSE_TYPE_PER_MONTH_PER_USER = 1; + */ + LICENSE_TYPE_PER_MONTH_PER_USER(1), + /** + * + * + *
+   * Bring your own license.
+   * 
+ * + * LICENSE_TYPE_BRING_YOUR_OWN_LICENSE = 2; + */ + LICENSE_TYPE_BRING_YOUR_OWN_LICENSE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * unspecified.
+   * 
+ * + * LICENSE_TYPE_UNSPECIFIED = 0; + */ + public static final int LICENSE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Billing will be based on number of users listed per month.
+   * 
+ * + * LICENSE_TYPE_PER_MONTH_PER_USER = 1; + */ + public static final int LICENSE_TYPE_PER_MONTH_PER_USER_VALUE = 1; + + /** + * + * + *
+   * Bring your own license.
+   * 
+ * + * LICENSE_TYPE_BRING_YOUR_OWN_LICENSE = 2; + */ + public static final int LICENSE_TYPE_BRING_YOUR_OWN_LICENSE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LicenseType 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 LicenseType forNumber(int value) { + switch (value) { + case 0: + return LICENSE_TYPE_UNSPECIFIED; + case 1: + return LICENSE_TYPE_PER_MONTH_PER_USER; + case 2: + return LICENSE_TYPE_BRING_YOUR_OWN_LICENSE; + 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 LicenseType findValueByNumber(int number) { + return LicenseType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final LicenseType[] VALUES = values(); + + public static LicenseType 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 LicenseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.licensemanager.v1.LicenseType) +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListConfigurationsRequest.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListConfigurationsRequest.java new file mode 100644 index 000000000000..25c47e1df7e1 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListConfigurationsRequest.java @@ -0,0 +1,1321 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for requesting list of Configurations
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.ListConfigurationsRequest} + */ +public final class ListConfigurationsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.ListConfigurationsRequest) + ListConfigurationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListConfigurationsRequest.newBuilder() to construct. + private ListConfigurationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListConfigurationsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListConfigurationsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListConfigurationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListConfigurationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.ListConfigurationsRequest.class, + com.google.cloud.licensemanager.v1.ListConfigurationsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for ListConfigurationsRequest
+   * 
+ * + * + * 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 value for ListConfigurationsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.ListConfigurationsRequest)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.ListConfigurationsRequest other = + (com.google.cloud.licensemanager.v1.ListConfigurationsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.ListConfigurationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for requesting list of Configurations
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.ListConfigurationsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.ListConfigurationsRequest) + com.google.cloud.licensemanager.v1.ListConfigurationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListConfigurationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListConfigurationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.ListConfigurationsRequest.class, + com.google.cloud.licensemanager.v1.ListConfigurationsRequest.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.ListConfigurationsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListConfigurationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListConfigurationsRequest + getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.ListConfigurationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListConfigurationsRequest build() { + com.google.cloud.licensemanager.v1.ListConfigurationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListConfigurationsRequest buildPartial() { + com.google.cloud.licensemanager.v1.ListConfigurationsRequest result = + new com.google.cloud.licensemanager.v1.ListConfigurationsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.licensemanager.v1.ListConfigurationsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.ListConfigurationsRequest) { + return mergeFrom((com.google.cloud.licensemanager.v1.ListConfigurationsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.ListConfigurationsRequest other) { + if (other + == com.google.cloud.licensemanager.v1.ListConfigurationsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent value for ListConfigurationsRequest
+     * 
+ * + * + * 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 value for ListConfigurationsRequest
+     * 
+ * + * + * 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 value for ListConfigurationsRequest
+     * 
+ * + * + * 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 value for ListConfigurationsRequest
+     * 
+ * + * + * 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 value for ListConfigurationsRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.ListConfigurationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.ListConfigurationsRequest) + private static final com.google.cloud.licensemanager.v1.ListConfigurationsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.ListConfigurationsRequest(); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListConfigurationsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListConfigurationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListConfigurationsRequestOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListConfigurationsRequestOrBuilder.java new file mode 100644 index 000000000000..9a0df65876fe --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListConfigurationsRequestOrBuilder.java @@ -0,0 +1,148 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface ListConfigurationsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.ListConfigurationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListConfigurationsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for ListConfigurationsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListConfigurationsResponse.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListConfigurationsResponse.java new file mode 100644 index 000000000000..7b35a0f13f58 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListConfigurationsResponse.java @@ -0,0 +1,1458 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for response to listing Configurations
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.ListConfigurationsResponse} + */ +public final class ListConfigurationsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.ListConfigurationsResponse) + ListConfigurationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListConfigurationsResponse.newBuilder() to construct. + private ListConfigurationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListConfigurationsResponse() { + configurations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListConfigurationsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListConfigurationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListConfigurationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.ListConfigurationsResponse.class, + com.google.cloud.licensemanager.v1.ListConfigurationsResponse.Builder.class); + } + + public static final int CONFIGURATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List configurations_; + + /** + * + * + *
+   * The list of Configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + @java.lang.Override + public java.util.List getConfigurationsList() { + return configurations_; + } + + /** + * + * + *
+   * The list of Configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + @java.lang.Override + public java.util.List + getConfigurationsOrBuilderList() { + return configurations_; + } + + /** + * + * + *
+   * The list of Configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + @java.lang.Override + public int getConfigurationsCount() { + return configurations_.size(); + } + + /** + * + * + *
+   * The list of Configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.Configuration getConfigurations(int index) { + return configurations_.get(index); + } + + /** + * + * + *
+   * The list of Configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.ConfigurationOrBuilder getConfigurationsOrBuilder( + int index) { + return configurations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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 identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < configurations_.size(); i++) { + output.writeMessage(1, configurations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < configurations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, configurations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.ListConfigurationsResponse)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.ListConfigurationsResponse other = + (com.google.cloud.licensemanager.v1.ListConfigurationsResponse) obj; + + if (!getConfigurationsList().equals(other.getConfigurationsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConfigurationsCount() > 0) { + hash = (37 * hash) + CONFIGURATIONS_FIELD_NUMBER; + hash = (53 * hash) + getConfigurationsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.ListConfigurationsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for response to listing Configurations
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.ListConfigurationsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.ListConfigurationsResponse) + com.google.cloud.licensemanager.v1.ListConfigurationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListConfigurationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListConfigurationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.ListConfigurationsResponse.class, + com.google.cloud.licensemanager.v1.ListConfigurationsResponse.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.ListConfigurationsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (configurationsBuilder_ == null) { + configurations_ = java.util.Collections.emptyList(); + } else { + configurations_ = null; + configurationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListConfigurationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListConfigurationsResponse + getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.ListConfigurationsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListConfigurationsResponse build() { + com.google.cloud.licensemanager.v1.ListConfigurationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListConfigurationsResponse buildPartial() { + com.google.cloud.licensemanager.v1.ListConfigurationsResponse result = + new com.google.cloud.licensemanager.v1.ListConfigurationsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.licensemanager.v1.ListConfigurationsResponse result) { + if (configurationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + configurations_ = java.util.Collections.unmodifiableList(configurations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.configurations_ = configurations_; + } else { + result.configurations_ = configurationsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.licensemanager.v1.ListConfigurationsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.ListConfigurationsResponse) { + return mergeFrom((com.google.cloud.licensemanager.v1.ListConfigurationsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.ListConfigurationsResponse other) { + if (other + == com.google.cloud.licensemanager.v1.ListConfigurationsResponse.getDefaultInstance()) + return this; + if (configurationsBuilder_ == null) { + if (!other.configurations_.isEmpty()) { + if (configurations_.isEmpty()) { + configurations_ = other.configurations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConfigurationsIsMutable(); + configurations_.addAll(other.configurations_); + } + onChanged(); + } + } else { + if (!other.configurations_.isEmpty()) { + if (configurationsBuilder_.isEmpty()) { + configurationsBuilder_.dispose(); + configurationsBuilder_ = null; + configurations_ = other.configurations_; + bitField0_ = (bitField0_ & ~0x00000001); + configurationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConfigurationsFieldBuilder() + : null; + } else { + configurationsBuilder_.addAllMessages(other.configurations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.licensemanager.v1.Configuration m = + input.readMessage( + com.google.cloud.licensemanager.v1.Configuration.parser(), + extensionRegistry); + if (configurationsBuilder_ == null) { + ensureConfigurationsIsMutable(); + configurations_.add(m); + } else { + configurationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List configurations_ = + java.util.Collections.emptyList(); + + private void ensureConfigurationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + configurations_ = + new java.util.ArrayList( + configurations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.licensemanager.v1.Configuration, + com.google.cloud.licensemanager.v1.Configuration.Builder, + com.google.cloud.licensemanager.v1.ConfigurationOrBuilder> + configurationsBuilder_; + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public java.util.List + getConfigurationsList() { + if (configurationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(configurations_); + } else { + return configurationsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public int getConfigurationsCount() { + if (configurationsBuilder_ == null) { + return configurations_.size(); + } else { + return configurationsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public com.google.cloud.licensemanager.v1.Configuration getConfigurations(int index) { + if (configurationsBuilder_ == null) { + return configurations_.get(index); + } else { + return configurationsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public Builder setConfigurations( + int index, com.google.cloud.licensemanager.v1.Configuration value) { + if (configurationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigurationsIsMutable(); + configurations_.set(index, value); + onChanged(); + } else { + configurationsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public Builder setConfigurations( + int index, com.google.cloud.licensemanager.v1.Configuration.Builder builderForValue) { + if (configurationsBuilder_ == null) { + ensureConfigurationsIsMutable(); + configurations_.set(index, builderForValue.build()); + onChanged(); + } else { + configurationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public Builder addConfigurations(com.google.cloud.licensemanager.v1.Configuration value) { + if (configurationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigurationsIsMutable(); + configurations_.add(value); + onChanged(); + } else { + configurationsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public Builder addConfigurations( + int index, com.google.cloud.licensemanager.v1.Configuration value) { + if (configurationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigurationsIsMutable(); + configurations_.add(index, value); + onChanged(); + } else { + configurationsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public Builder addConfigurations( + com.google.cloud.licensemanager.v1.Configuration.Builder builderForValue) { + if (configurationsBuilder_ == null) { + ensureConfigurationsIsMutable(); + configurations_.add(builderForValue.build()); + onChanged(); + } else { + configurationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public Builder addConfigurations( + int index, com.google.cloud.licensemanager.v1.Configuration.Builder builderForValue) { + if (configurationsBuilder_ == null) { + ensureConfigurationsIsMutable(); + configurations_.add(index, builderForValue.build()); + onChanged(); + } else { + configurationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public Builder addAllConfigurations( + java.lang.Iterable values) { + if (configurationsBuilder_ == null) { + ensureConfigurationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, configurations_); + onChanged(); + } else { + configurationsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public Builder clearConfigurations() { + if (configurationsBuilder_ == null) { + configurations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + configurationsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public Builder removeConfigurations(int index) { + if (configurationsBuilder_ == null) { + ensureConfigurationsIsMutable(); + configurations_.remove(index); + onChanged(); + } else { + configurationsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public com.google.cloud.licensemanager.v1.Configuration.Builder getConfigurationsBuilder( + int index) { + return getConfigurationsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public com.google.cloud.licensemanager.v1.ConfigurationOrBuilder getConfigurationsOrBuilder( + int index) { + if (configurationsBuilder_ == null) { + return configurations_.get(index); + } else { + return configurationsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public java.util.List + getConfigurationsOrBuilderList() { + if (configurationsBuilder_ != null) { + return configurationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(configurations_); + } + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public com.google.cloud.licensemanager.v1.Configuration.Builder addConfigurationsBuilder() { + return getConfigurationsFieldBuilder() + .addBuilder(com.google.cloud.licensemanager.v1.Configuration.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public com.google.cloud.licensemanager.v1.Configuration.Builder addConfigurationsBuilder( + int index) { + return getConfigurationsFieldBuilder() + .addBuilder(index, com.google.cloud.licensemanager.v1.Configuration.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Configuration
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + public java.util.List + getConfigurationsBuilderList() { + return getConfigurationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.licensemanager.v1.Configuration, + com.google.cloud.licensemanager.v1.Configuration.Builder, + com.google.cloud.licensemanager.v1.ConfigurationOrBuilder> + getConfigurationsFieldBuilder() { + if (configurationsBuilder_ == null) { + configurationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.licensemanager.v1.Configuration, + com.google.cloud.licensemanager.v1.Configuration.Builder, + com.google.cloud.licensemanager.v1.ConfigurationOrBuilder>( + configurations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + configurations_ = null; + } + return configurationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.ListConfigurationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.ListConfigurationsResponse) + private static final com.google.cloud.licensemanager.v1.ListConfigurationsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.ListConfigurationsResponse(); + } + + public static com.google.cloud.licensemanager.v1.ListConfigurationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListConfigurationsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListConfigurationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListConfigurationsResponseOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListConfigurationsResponseOrBuilder.java new file mode 100644 index 000000000000..7d4a310c8dfd --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListConfigurationsResponseOrBuilder.java @@ -0,0 +1,162 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface ListConfigurationsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.ListConfigurationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + java.util.List getConfigurationsList(); + + /** + * + * + *
+   * The list of Configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + com.google.cloud.licensemanager.v1.Configuration getConfigurations(int index); + + /** + * + * + *
+   * The list of Configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + int getConfigurationsCount(); + + /** + * + * + *
+   * The list of Configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + java.util.List + getConfigurationsOrBuilderList(); + + /** + * + * + *
+   * The list of Configuration
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Configuration configurations = 1; + */ + com.google.cloud.licensemanager.v1.ConfigurationOrBuilder getConfigurationsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListInstancesRequest.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListInstancesRequest.java new file mode 100644 index 000000000000..bc2b80ba57f5 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListInstancesRequest.java @@ -0,0 +1,1317 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for requesting list of Instances
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.ListInstancesRequest} + */ +public final class ListInstancesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.ListInstancesRequest) + ListInstancesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListInstancesRequest.newBuilder() to construct. + private ListInstancesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.ListInstancesRequest.class, + com.google.cloud.licensemanager.v1.ListInstancesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for ListInstancesRequest
+   * 
+ * + * + * 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 value for ListInstancesRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.ListInstancesRequest)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.ListInstancesRequest other = + (com.google.cloud.licensemanager.v1.ListInstancesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.ListInstancesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.ListInstancesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for requesting list of Instances
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.ListInstancesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.ListInstancesRequest) + com.google.cloud.licensemanager.v1.ListInstancesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListInstancesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.ListInstancesRequest.class, + com.google.cloud.licensemanager.v1.ListInstancesRequest.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.ListInstancesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListInstancesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListInstancesRequest getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.ListInstancesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListInstancesRequest build() { + com.google.cloud.licensemanager.v1.ListInstancesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListInstancesRequest buildPartial() { + com.google.cloud.licensemanager.v1.ListInstancesRequest result = + new com.google.cloud.licensemanager.v1.ListInstancesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.ListInstancesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.ListInstancesRequest) { + return mergeFrom((com.google.cloud.licensemanager.v1.ListInstancesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.ListInstancesRequest other) { + if (other == com.google.cloud.licensemanager.v1.ListInstancesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent value for ListInstancesRequest
+     * 
+ * + * + * 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 value for ListInstancesRequest
+     * 
+ * + * + * 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 value for ListInstancesRequest
+     * 
+ * + * + * 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 value for ListInstancesRequest
+     * 
+ * + * + * 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 value for ListInstancesRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.ListInstancesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.ListInstancesRequest) + private static final com.google.cloud.licensemanager.v1.ListInstancesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.ListInstancesRequest(); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListInstancesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListInstancesRequestOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListInstancesRequestOrBuilder.java new file mode 100644 index 000000000000..e6a9953765b8 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListInstancesRequestOrBuilder.java @@ -0,0 +1,148 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface ListInstancesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.ListInstancesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListInstancesRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for ListInstancesRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListInstancesResponse.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListInstancesResponse.java new file mode 100644 index 000000000000..7db874513342 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListInstancesResponse.java @@ -0,0 +1,1442 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for response to listing Instances
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.ListInstancesResponse} + */ +public final class ListInstancesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.ListInstancesResponse) + ListInstancesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListInstancesResponse.newBuilder() to construct. + private ListInstancesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstancesResponse() { + instances_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInstancesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.ListInstancesResponse.class, + com.google.cloud.licensemanager.v1.ListInstancesResponse.Builder.class); + } + + public static final int INSTANCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List instances_; + + /** + * + * + *
+   * The list of Instance
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + @java.lang.Override + public java.util.List getInstancesList() { + return instances_; + } + + /** + * + * + *
+   * The list of Instance
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + @java.lang.Override + public java.util.List + getInstancesOrBuilderList() { + return instances_; + } + + /** + * + * + *
+   * The list of Instance
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + @java.lang.Override + public int getInstancesCount() { + return instances_.size(); + } + + /** + * + * + *
+   * The list of Instance
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.Instance getInstances(int index) { + return instances_.get(index); + } + + /** + * + * + *
+   * The list of Instance
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.InstanceOrBuilder getInstancesOrBuilder(int index) { + return instances_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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 identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < instances_.size(); i++) { + output.writeMessage(1, instances_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < instances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, instances_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.ListInstancesResponse)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.ListInstancesResponse other = + (com.google.cloud.licensemanager.v1.ListInstancesResponse) obj; + + if (!getInstancesList().equals(other.getInstancesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInstancesCount() > 0) { + hash = (37 * hash) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstancesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.ListInstancesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.ListInstancesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for response to listing Instances
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.ListInstancesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.ListInstancesResponse) + com.google.cloud.licensemanager.v1.ListInstancesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListInstancesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.ListInstancesResponse.class, + com.google.cloud.licensemanager.v1.ListInstancesResponse.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.ListInstancesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + } else { + instances_ = null; + instancesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListInstancesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListInstancesResponse getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.ListInstancesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListInstancesResponse build() { + com.google.cloud.licensemanager.v1.ListInstancesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListInstancesResponse buildPartial() { + com.google.cloud.licensemanager.v1.ListInstancesResponse result = + new com.google.cloud.licensemanager.v1.ListInstancesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.licensemanager.v1.ListInstancesResponse result) { + if (instancesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instances_ = instances_; + } else { + result.instances_ = instancesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.ListInstancesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.ListInstancesResponse) { + return mergeFrom((com.google.cloud.licensemanager.v1.ListInstancesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.ListInstancesResponse other) { + if (other == com.google.cloud.licensemanager.v1.ListInstancesResponse.getDefaultInstance()) + return this; + if (instancesBuilder_ == null) { + if (!other.instances_.isEmpty()) { + if (instances_.isEmpty()) { + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstancesIsMutable(); + instances_.addAll(other.instances_); + } + onChanged(); + } + } else { + if (!other.instances_.isEmpty()) { + if (instancesBuilder_.isEmpty()) { + instancesBuilder_.dispose(); + instancesBuilder_ = null; + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + instancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstancesFieldBuilder() + : null; + } else { + instancesBuilder_.addAllMessages(other.instances_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.licensemanager.v1.Instance m = + input.readMessage( + com.google.cloud.licensemanager.v1.Instance.parser(), extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List instances_ = + java.util.Collections.emptyList(); + + private void ensureInstancesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + instances_ = + new java.util.ArrayList(instances_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.licensemanager.v1.Instance, + com.google.cloud.licensemanager.v1.Instance.Builder, + com.google.cloud.licensemanager.v1.InstanceOrBuilder> + instancesBuilder_; + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public java.util.List getInstancesList() { + if (instancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(instances_); + } else { + return instancesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public int getInstancesCount() { + if (instancesBuilder_ == null) { + return instances_.size(); + } else { + return instancesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public com.google.cloud.licensemanager.v1.Instance getInstances(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public Builder setInstances(int index, com.google.cloud.licensemanager.v1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.set(index, value); + onChanged(); + } else { + instancesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public Builder setInstances( + int index, com.google.cloud.licensemanager.v1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.set(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public Builder addInstances(com.google.cloud.licensemanager.v1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(value); + onChanged(); + } else { + instancesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public Builder addInstances(int index, com.google.cloud.licensemanager.v1.Instance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(index, value); + onChanged(); + } else { + instancesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public Builder addInstances( + com.google.cloud.licensemanager.v1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public Builder addInstances( + int index, com.google.cloud.licensemanager.v1.Instance.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public Builder addAllInstances( + java.lang.Iterable values) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_); + onChanged(); + } else { + instancesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public Builder clearInstances() { + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + instancesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public Builder removeInstances(int index) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.remove(index); + onChanged(); + } else { + instancesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public com.google.cloud.licensemanager.v1.Instance.Builder getInstancesBuilder(int index) { + return getInstancesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public com.google.cloud.licensemanager.v1.InstanceOrBuilder getInstancesOrBuilder(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public java.util.List + getInstancesOrBuilderList() { + if (instancesBuilder_ != null) { + return instancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instances_); + } + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public com.google.cloud.licensemanager.v1.Instance.Builder addInstancesBuilder() { + return getInstancesFieldBuilder() + .addBuilder(com.google.cloud.licensemanager.v1.Instance.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public com.google.cloud.licensemanager.v1.Instance.Builder addInstancesBuilder(int index) { + return getInstancesFieldBuilder() + .addBuilder(index, com.google.cloud.licensemanager.v1.Instance.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Instance
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + public java.util.List + getInstancesBuilderList() { + return getInstancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.licensemanager.v1.Instance, + com.google.cloud.licensemanager.v1.Instance.Builder, + com.google.cloud.licensemanager.v1.InstanceOrBuilder> + getInstancesFieldBuilder() { + if (instancesBuilder_ == null) { + instancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.licensemanager.v1.Instance, + com.google.cloud.licensemanager.v1.Instance.Builder, + com.google.cloud.licensemanager.v1.InstanceOrBuilder>( + instances_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + instances_ = null; + } + return instancesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.ListInstancesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.ListInstancesResponse) + private static final com.google.cloud.licensemanager.v1.ListInstancesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.ListInstancesResponse(); + } + + public static com.google.cloud.licensemanager.v1.ListInstancesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstancesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListInstancesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListInstancesResponseOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListInstancesResponseOrBuilder.java new file mode 100644 index 000000000000..d1af13dbebbe --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListInstancesResponseOrBuilder.java @@ -0,0 +1,162 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface ListInstancesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.ListInstancesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Instance
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + java.util.List getInstancesList(); + + /** + * + * + *
+   * The list of Instance
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + com.google.cloud.licensemanager.v1.Instance getInstances(int index); + + /** + * + * + *
+   * The list of Instance
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + int getInstancesCount(); + + /** + * + * + *
+   * The list of Instance
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + java.util.List + getInstancesOrBuilderList(); + + /** + * + * + *
+   * The list of Instance
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Instance instances = 1; + */ + com.google.cloud.licensemanager.v1.InstanceOrBuilder getInstancesOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListProductsRequest.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListProductsRequest.java new file mode 100644 index 000000000000..5a7e1f28a3f1 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListProductsRequest.java @@ -0,0 +1,1317 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for requesting list of Products
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.ListProductsRequest} + */ +public final class ListProductsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.ListProductsRequest) + ListProductsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListProductsRequest.newBuilder() to construct. + private ListProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListProductsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListProductsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.ListProductsRequest.class, + com.google.cloud.licensemanager.v1.ListProductsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for ListProductsRequest
+   * 
+ * + * + * 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 value for ListProductsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * 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 token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.ListProductsRequest)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.ListProductsRequest other = + (com.google.cloud.licensemanager.v1.ListProductsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.ListProductsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListProductsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListProductsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListProductsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListProductsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListProductsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListProductsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListProductsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListProductsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListProductsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.ListProductsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for requesting list of Products
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.ListProductsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.ListProductsRequest) + com.google.cloud.licensemanager.v1.ListProductsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.ListProductsRequest.class, + com.google.cloud.licensemanager.v1.ListProductsRequest.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.ListProductsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListProductsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListProductsRequest getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.ListProductsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListProductsRequest build() { + com.google.cloud.licensemanager.v1.ListProductsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListProductsRequest buildPartial() { + com.google.cloud.licensemanager.v1.ListProductsRequest result = + new com.google.cloud.licensemanager.v1.ListProductsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.ListProductsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.ListProductsRequest) { + return mergeFrom((com.google.cloud.licensemanager.v1.ListProductsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.ListProductsRequest other) { + if (other == com.google.cloud.licensemanager.v1.ListProductsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent value for ListProductsRequest
+     * 
+ * + * + * 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 value for ListProductsRequest
+     * 
+ * + * + * 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 value for ListProductsRequest
+     * 
+ * + * + * 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 value for ListProductsRequest
+     * 
+ * + * + * 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 value for ListProductsRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * 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 token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.ListProductsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.ListProductsRequest) + private static final com.google.cloud.licensemanager.v1.ListProductsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.ListProductsRequest(); + } + + public static com.google.cloud.licensemanager.v1.ListProductsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListProductsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListProductsRequestOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListProductsRequestOrBuilder.java new file mode 100644 index 000000000000..63ca4391199c --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListProductsRequestOrBuilder.java @@ -0,0 +1,148 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface ListProductsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.ListProductsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListProductsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for ListProductsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListProductsResponse.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListProductsResponse.java new file mode 100644 index 000000000000..fe3462299a40 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListProductsResponse.java @@ -0,0 +1,1440 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for response to listing Products
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.ListProductsResponse} + */ +public final class ListProductsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.ListProductsResponse) + ListProductsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListProductsResponse.newBuilder() to construct. + private ListProductsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListProductsResponse() { + products_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListProductsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListProductsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListProductsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.ListProductsResponse.class, + com.google.cloud.licensemanager.v1.ListProductsResponse.Builder.class); + } + + public static final int PRODUCTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List products_; + + /** + * + * + *
+   * The list of Product
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + @java.lang.Override + public java.util.List getProductsList() { + return products_; + } + + /** + * + * + *
+   * The list of Product
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + @java.lang.Override + public java.util.List + getProductsOrBuilderList() { + return products_; + } + + /** + * + * + *
+   * The list of Product
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + @java.lang.Override + public int getProductsCount() { + return products_.size(); + } + + /** + * + * + *
+   * The list of Product
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.Product getProducts(int index) { + return products_.get(index); + } + + /** + * + * + *
+   * The list of Product
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.ProductOrBuilder getProductsOrBuilder(int index) { + return products_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * 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 identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < products_.size(); i++) { + output.writeMessage(1, products_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < products_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, products_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.ListProductsResponse)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.ListProductsResponse other = + (com.google.cloud.licensemanager.v1.ListProductsResponse) obj; + + if (!getProductsList().equals(other.getProductsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProductsCount() > 0) { + hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; + hash = (53 * hash) + getProductsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.ListProductsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListProductsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListProductsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListProductsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListProductsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ListProductsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListProductsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListProductsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListProductsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListProductsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ListProductsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ListProductsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.ListProductsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for response to listing Products
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.ListProductsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.ListProductsResponse) + com.google.cloud.licensemanager.v1.ListProductsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListProductsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListProductsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.ListProductsResponse.class, + com.google.cloud.licensemanager.v1.ListProductsResponse.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.ListProductsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (productsBuilder_ == null) { + products_ = java.util.Collections.emptyList(); + } else { + products_ = null; + productsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ListProductsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListProductsResponse getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.ListProductsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListProductsResponse build() { + com.google.cloud.licensemanager.v1.ListProductsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListProductsResponse buildPartial() { + com.google.cloud.licensemanager.v1.ListProductsResponse result = + new com.google.cloud.licensemanager.v1.ListProductsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.licensemanager.v1.ListProductsResponse result) { + if (productsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + products_ = java.util.Collections.unmodifiableList(products_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.products_ = products_; + } else { + result.products_ = productsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.ListProductsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.ListProductsResponse) { + return mergeFrom((com.google.cloud.licensemanager.v1.ListProductsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.ListProductsResponse other) { + if (other == com.google.cloud.licensemanager.v1.ListProductsResponse.getDefaultInstance()) + return this; + if (productsBuilder_ == null) { + if (!other.products_.isEmpty()) { + if (products_.isEmpty()) { + products_ = other.products_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductsIsMutable(); + products_.addAll(other.products_); + } + onChanged(); + } + } else { + if (!other.products_.isEmpty()) { + if (productsBuilder_.isEmpty()) { + productsBuilder_.dispose(); + productsBuilder_ = null; + products_ = other.products_; + bitField0_ = (bitField0_ & ~0x00000001); + productsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getProductsFieldBuilder() + : null; + } else { + productsBuilder_.addAllMessages(other.products_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.licensemanager.v1.Product m = + input.readMessage( + com.google.cloud.licensemanager.v1.Product.parser(), extensionRegistry); + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(m); + } else { + productsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List products_ = + java.util.Collections.emptyList(); + + private void ensureProductsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + products_ = new java.util.ArrayList(products_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.licensemanager.v1.Product, + com.google.cloud.licensemanager.v1.Product.Builder, + com.google.cloud.licensemanager.v1.ProductOrBuilder> + productsBuilder_; + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public java.util.List getProductsList() { + if (productsBuilder_ == null) { + return java.util.Collections.unmodifiableList(products_); + } else { + return productsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public int getProductsCount() { + if (productsBuilder_ == null) { + return products_.size(); + } else { + return productsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public com.google.cloud.licensemanager.v1.Product getProducts(int index) { + if (productsBuilder_ == null) { + return products_.get(index); + } else { + return productsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public Builder setProducts(int index, com.google.cloud.licensemanager.v1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.set(index, value); + onChanged(); + } else { + productsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public Builder setProducts( + int index, com.google.cloud.licensemanager.v1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.set(index, builderForValue.build()); + onChanged(); + } else { + productsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public Builder addProducts(com.google.cloud.licensemanager.v1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.add(value); + onChanged(); + } else { + productsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public Builder addProducts(int index, com.google.cloud.licensemanager.v1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.add(index, value); + onChanged(); + } else { + productsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public Builder addProducts(com.google.cloud.licensemanager.v1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(builderForValue.build()); + onChanged(); + } else { + productsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public Builder addProducts( + int index, com.google.cloud.licensemanager.v1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(index, builderForValue.build()); + onChanged(); + } else { + productsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public Builder addAllProducts( + java.lang.Iterable values) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, products_); + onChanged(); + } else { + productsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public Builder clearProducts() { + if (productsBuilder_ == null) { + products_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + productsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public Builder removeProducts(int index) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.remove(index); + onChanged(); + } else { + productsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public com.google.cloud.licensemanager.v1.Product.Builder getProductsBuilder(int index) { + return getProductsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public com.google.cloud.licensemanager.v1.ProductOrBuilder getProductsOrBuilder(int index) { + if (productsBuilder_ == null) { + return products_.get(index); + } else { + return productsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public java.util.List + getProductsOrBuilderList() { + if (productsBuilder_ != null) { + return productsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(products_); + } + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public com.google.cloud.licensemanager.v1.Product.Builder addProductsBuilder() { + return getProductsFieldBuilder() + .addBuilder(com.google.cloud.licensemanager.v1.Product.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public com.google.cloud.licensemanager.v1.Product.Builder addProductsBuilder(int index) { + return getProductsFieldBuilder() + .addBuilder(index, com.google.cloud.licensemanager.v1.Product.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Product
+     * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + public java.util.List + getProductsBuilderList() { + return getProductsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.licensemanager.v1.Product, + com.google.cloud.licensemanager.v1.Product.Builder, + com.google.cloud.licensemanager.v1.ProductOrBuilder> + getProductsFieldBuilder() { + if (productsBuilder_ == null) { + productsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.licensemanager.v1.Product, + com.google.cloud.licensemanager.v1.Product.Builder, + com.google.cloud.licensemanager.v1.ProductOrBuilder>( + products_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + products_ = null; + } + return productsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * 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 identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.ListProductsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.ListProductsResponse) + private static final com.google.cloud.licensemanager.v1.ListProductsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.ListProductsResponse(); + } + + public static com.google.cloud.licensemanager.v1.ListProductsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ListProductsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListProductsResponseOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListProductsResponseOrBuilder.java new file mode 100644 index 000000000000..99653fd8720a --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ListProductsResponseOrBuilder.java @@ -0,0 +1,162 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface ListProductsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.ListProductsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Product
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + java.util.List getProductsList(); + + /** + * + * + *
+   * The list of Product
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + com.google.cloud.licensemanager.v1.Product getProducts(int index); + + /** + * + * + *
+   * The list of Product
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + int getProductsCount(); + + /** + * + * + *
+   * The list of Product
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + java.util.List + getProductsOrBuilderList(); + + /** + * + * + *
+   * The list of Product
+   * 
+ * + * repeated .google.cloud.licensemanager.v1.Product products = 1; + */ + com.google.cloud.licensemanager.v1.ProductOrBuilder getProductsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/LocationName.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/LocationName.java new file mode 100644 index 000000000000..2daba1c9c5f1 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LocationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected LocationName() { + project = null; + location = null; + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LocationName that = ((LocationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(LocationName locationName) { + this.project = locationName.project; + this.location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/OperationMetadata.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/OperationMetadata.java new file mode 100644 index 000000000000..cb718d2c488e --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/OperationMetadata.java @@ -0,0 +1,1910 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.OperationMetadata.class, + com.google.cloud.licensemanager.v1.OperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have been cancelled successfully
+   * have
+   * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+   * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.OperationMetadata other = + (com.google.cloud.licensemanager.v1.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.licensemanager.v1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.OperationMetadata) + com.google.cloud.licensemanager.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.OperationMetadata.class, + com.google.cloud.licensemanager.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.OperationMetadata build() { + com.google.cloud.licensemanager.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.OperationMetadata buildPartial() { + com.google.cloud.licensemanager.v1.OperationMetadata result = + new com.google.cloud.licensemanager.v1.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.OperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.licensemanager.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.OperationMetadata other) { + if (other == com.google.cloud.licensemanager.v1.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + 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: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + apiVersion_ = 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 com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have
+     * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+     * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have
+     * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+     * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have
+     * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+     * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.OperationMetadata) + private static final com.google.cloud.licensemanager.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.OperationMetadata(); + } + + public static com.google.cloud.licensemanager.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/OperationMetadataOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..7f5ac35edf64 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,228 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have been cancelled successfully
+   * have
+   * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+   * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/Product.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/Product.java new file mode 100644 index 000000000000..7144f74ee1b5 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/Product.java @@ -0,0 +1,1961 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/api_entities.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Products for Google SPLA.
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.Product} + */ +public final class Product extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.Product) + ProductOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Product.newBuilder() to construct. + private Product(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Product() { + name_ = ""; + version_ = ""; + productCompany_ = ""; + state_ = 0; + sku_ = ""; + description_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Product(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Product_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Product_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.Product.class, + com.google.cloud.licensemanager.v1.Product.Builder.class); + } + + /** + * + * + *
+   * State of the product.
+   * 
+ * + * Protobuf enum {@code google.cloud.licensemanager.v1.Product.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The Status of the product is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Product is under provisioning stage.
+     * 
+ * + * STATE_PROVISIONING = 1; + */ + STATE_PROVISIONING(1), + /** + * + * + *
+     * Product is ok to run on instances.
+     * 
+ * + * STATE_RUNNING = 2; + */ + STATE_RUNNING(2), + /** + * + * + *
+     * The product is about to terminate or has been announced for termination.
+     * 
+ * + * STATE_TERMINATING = 3; + */ + STATE_TERMINATING(3), + /** + * + * + *
+     * The product has been terminated.
+     * 
+ * + * STATE_TERMINATED = 4; + */ + STATE_TERMINATED(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The Status of the product is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Product is under provisioning stage.
+     * 
+ * + * STATE_PROVISIONING = 1; + */ + public static final int STATE_PROVISIONING_VALUE = 1; + + /** + * + * + *
+     * Product is ok to run on instances.
+     * 
+ * + * STATE_RUNNING = 2; + */ + public static final int STATE_RUNNING_VALUE = 2; + + /** + * + * + *
+     * The product is about to terminate or has been announced for termination.
+     * 
+ * + * STATE_TERMINATING = 3; + */ + public static final int STATE_TERMINATING_VALUE = 3; + + /** + * + * + *
+     * The product has been terminated.
+     * 
+ * + * STATE_TERMINATED = 4; + */ + public static final int STATE_TERMINATED_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 State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return STATE_PROVISIONING; + case 2: + return STATE_RUNNING; + case 3: + return STATE_TERMINATING; + case 4: + return STATE_TERMINATED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.Product.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.licensemanager.v1.Product.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. Full name of the product resource.
+   * ex "projects/1/locations/us-central1/products/office-2021"
+   * 
+ * + * 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. Full name of the product resource.
+   * ex "projects/1/locations/us-central1/products/office-2021"
+   * 
+ * + * 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 VERSION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; + + /** + * + * + *
+   * Required. Version of the product.
+   * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Version of the product.
+   * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_COMPANY_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object productCompany_ = ""; + + /** + * + * + *
+   * Required. Company that released the product.
+   * 
+ * + * string product_company = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The productCompany. + */ + @java.lang.Override + public java.lang.String getProductCompany() { + java.lang.Object ref = productCompany_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productCompany_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Company that released the product.
+   * 
+ * + * string product_company = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for productCompany. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProductCompanyBytes() { + java.lang.Object ref = productCompany_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + productCompany_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + + /** + * + * + *
+   * Output only. State of the product.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Product.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. State of the product.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Product.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.Product.State getState() { + com.google.cloud.licensemanager.v1.Product.State result = + com.google.cloud.licensemanager.v1.Product.State.forNumber(state_); + return result == null ? com.google.cloud.licensemanager.v1.Product.State.UNRECOGNIZED : result; + } + + public static final int SKU_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object sku_ = ""; + + /** + * + * + *
+   * Required. SKU for mapping to the Billing/Subscription resource.
+   * 
+ * + * string sku = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sku. + */ + @java.lang.Override + public java.lang.String getSku() { + java.lang.Object ref = sku_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sku_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. SKU for mapping to the Billing/Subscription resource.
+   * 
+ * + * string sku = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for sku. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSkuBytes() { + java.lang.Object ref = sku_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sku_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Required. Human-readable, detailed description of the Product
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Human-readable, detailed description of the Product
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Required. Human-readable name of the Product
+   * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Human-readable name of the Product
+   * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productCompany_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productCompany_); + } + if (state_ != com.google.cloud.licensemanager.v1.Product.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sku_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, sku_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, displayName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productCompany_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productCompany_); + } + if (state_ != com.google.cloud.licensemanager.v1.Product.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sku_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, sku_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, displayName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.Product)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.Product other = + (com.google.cloud.licensemanager.v1.Product) obj; + + if (!getName().equals(other.getName())) return false; + if (!getVersion().equals(other.getVersion())) return false; + if (!getProductCompany().equals(other.getProductCompany())) return false; + if (state_ != other.state_) return false; + if (!getSku().equals(other.getSku())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + PRODUCT_COMPANY_FIELD_NUMBER; + hash = (53 * hash) + getProductCompany().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + SKU_FIELD_NUMBER; + hash = (53 * hash) + getSku().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.Product parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.Product parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Product parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.Product parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Product parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.Product parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Product parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.Product parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Product parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.Product parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Product parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.Product parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.licensemanager.v1.Product prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Products for Google SPLA.
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.Product} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.Product) + com.google.cloud.licensemanager.v1.ProductOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Product_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Product_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.Product.class, + com.google.cloud.licensemanager.v1.Product.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.Product.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + version_ = ""; + productCompany_ = ""; + state_ = 0; + sku_ = ""; + description_ = ""; + displayName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Product_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.Product getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.Product.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.Product build() { + com.google.cloud.licensemanager.v1.Product result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.Product buildPartial() { + com.google.cloud.licensemanager.v1.Product result = + new com.google.cloud.licensemanager.v1.Product(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.Product result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.productCompany_ = productCompany_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.sku_ = sku_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.displayName_ = displayName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.Product) { + return mergeFrom((com.google.cloud.licensemanager.v1.Product) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.Product other) { + if (other == com.google.cloud.licensemanager.v1.Product.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getProductCompany().isEmpty()) { + productCompany_ = other.productCompany_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getSku().isEmpty()) { + sku_ = other.sku_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + 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: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + productCompany_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + sku_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + displayName_ = 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. Full name of the product resource.
+     * ex "projects/1/locations/us-central1/products/office-2021"
+     * 
+ * + * 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. Full name of the product resource.
+     * ex "projects/1/locations/us-central1/products/office-2021"
+     * 
+ * + * 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. Full name of the product resource.
+     * ex "projects/1/locations/us-central1/products/office-2021"
+     * 
+ * + * 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. Full name of the product resource.
+     * ex "projects/1/locations/us-central1/products/office-2021"
+     * 
+ * + * 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. Full name of the product resource.
+     * ex "projects/1/locations/us-central1/products/office-2021"
+     * 
+ * + * 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 version_ = ""; + + /** + * + * + *
+     * Required. Version of the product.
+     * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Version of the product.
+     * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Version of the product.
+     * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Version of the product.
+     * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Version of the product.
+     * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object productCompany_ = ""; + + /** + * + * + *
+     * Required. Company that released the product.
+     * 
+ * + * string product_company = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The productCompany. + */ + public java.lang.String getProductCompany() { + java.lang.Object ref = productCompany_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productCompany_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Company that released the product.
+     * 
+ * + * string product_company = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for productCompany. + */ + public com.google.protobuf.ByteString getProductCompanyBytes() { + java.lang.Object ref = productCompany_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + productCompany_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Company that released the product.
+     * 
+ * + * string product_company = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The productCompany to set. + * @return This builder for chaining. + */ + public Builder setProductCompany(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + productCompany_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Company that released the product.
+     * 
+ * + * string product_company = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProductCompany() { + productCompany_ = getDefaultInstance().getProductCompany(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Company that released the product.
+     * 
+ * + * string product_company = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for productCompany to set. + * @return This builder for chaining. + */ + public Builder setProductCompanyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + productCompany_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. State of the product.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Product.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. State of the product.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Product.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. State of the product.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Product.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.Product.State getState() { + com.google.cloud.licensemanager.v1.Product.State result = + com.google.cloud.licensemanager.v1.Product.State.forNumber(state_); + return result == null + ? com.google.cloud.licensemanager.v1.Product.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. State of the product.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Product.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.licensemanager.v1.Product.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. State of the product.
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Product.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object sku_ = ""; + + /** + * + * + *
+     * Required. SKU for mapping to the Billing/Subscription resource.
+     * 
+ * + * string sku = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sku. + */ + public java.lang.String getSku() { + java.lang.Object ref = sku_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sku_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. SKU for mapping to the Billing/Subscription resource.
+     * 
+ * + * string sku = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for sku. + */ + public com.google.protobuf.ByteString getSkuBytes() { + java.lang.Object ref = sku_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sku_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. SKU for mapping to the Billing/Subscription resource.
+     * 
+ * + * string sku = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The sku to set. + * @return This builder for chaining. + */ + public Builder setSku(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sku_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. SKU for mapping to the Billing/Subscription resource.
+     * 
+ * + * string sku = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSku() { + sku_ = getDefaultInstance().getSku(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. SKU for mapping to the Billing/Subscription resource.
+     * 
+ * + * string sku = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for sku to set. + * @return This builder for chaining. + */ + public Builder setSkuBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sku_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Required. Human-readable, detailed description of the Product
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Human-readable, detailed description of the Product
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Human-readable, detailed description of the Product
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Human-readable, detailed description of the Product
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Human-readable, detailed description of the Product
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Required. Human-readable name of the Product
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Human-readable name of the Product
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Human-readable name of the Product
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Human-readable name of the Product
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Human-readable name of the Product
+     * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.Product) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.Product) + private static final com.google.cloud.licensemanager.v1.Product DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.Product(); + } + + public static com.google.cloud.licensemanager.v1.Product getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Product parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.Product getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ProductName.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ProductName.java new file mode 100644 index 000000000000..5387400ca1d9 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ProductName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProductName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_PRODUCT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/products/{product}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String product; + + @Deprecated + protected ProductName() { + project = null; + location = null; + product = null; + } + + private ProductName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + product = Preconditions.checkNotNull(builder.getProduct()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProduct() { + return product; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProductName of(String project, String location, String product) { + return newBuilder().setProject(project).setLocation(location).setProduct(product).build(); + } + + public static String format(String project, String location, String product) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setProduct(product) + .build() + .toString(); + } + + public static ProductName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_PRODUCT.validatedMatch( + formattedString, "ProductName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("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 values) { + List list = new ArrayList<>(values.size()); + for (ProductName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_PRODUCT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (product != null) { + fieldMapBuilder.put("product", product); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_PRODUCT.instantiate( + "project", project, "location", location, "product", product); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ProductName that = ((ProductName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.product, that.product); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(product); + return h; + } + + /** Builder for projects/{project}/locations/{location}/products/{product}. */ + public static class Builder { + private String project; + private String location; + private String product; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getProduct() { + return product; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setProduct(String product) { + this.product = product; + return this; + } + + private Builder(ProductName productName) { + this.project = productName.project; + this.location = productName.location; + this.product = productName.product; + } + + public ProductName build() { + return new ProductName(this); + } + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ProductOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ProductOrBuilder.java new file mode 100644 index 000000000000..6a6164e29609 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ProductOrBuilder.java @@ -0,0 +1,214 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/api_entities.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface ProductOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.Product) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Full name of the product resource.
+   * ex "projects/1/locations/us-central1/products/office-2021"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. Full name of the product resource.
+   * ex "projects/1/locations/us-central1/products/office-2021"
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Version of the product.
+   * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The version. + */ + java.lang.String getVersion(); + + /** + * + * + *
+   * Required. Version of the product.
+   * 
+ * + * string version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + + /** + * + * + *
+   * Required. Company that released the product.
+   * 
+ * + * string product_company = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The productCompany. + */ + java.lang.String getProductCompany(); + + /** + * + * + *
+   * Required. Company that released the product.
+   * 
+ * + * string product_company = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for productCompany. + */ + com.google.protobuf.ByteString getProductCompanyBytes(); + + /** + * + * + *
+   * Output only. State of the product.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Product.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. State of the product.
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Product.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.licensemanager.v1.Product.State getState(); + + /** + * + * + *
+   * Required. SKU for mapping to the Billing/Subscription resource.
+   * 
+ * + * string sku = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sku. + */ + java.lang.String getSku(); + + /** + * + * + *
+   * Required. SKU for mapping to the Billing/Subscription resource.
+   * 
+ * + * string sku = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for sku. + */ + com.google.protobuf.ByteString getSkuBytes(); + + /** + * + * + *
+   * Required. Human-readable, detailed description of the Product
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Required. Human-readable, detailed description of the Product
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. Human-readable name of the Product
+   * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Required. Human-readable name of the Product
+   * 
+ * + * string display_name = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/QueryConfigurationLicenseUsageRequest.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/QueryConfigurationLicenseUsageRequest.java new file mode 100644 index 000000000000..1351ccfd4474 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/QueryConfigurationLicenseUsageRequest.java @@ -0,0 +1,1267 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for requesting license usage per configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest} + */ +public final class QueryConfigurationLicenseUsageRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest) + QueryConfigurationLicenseUsageRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use QueryConfigurationLicenseUsageRequest.newBuilder() to construct. + private QueryConfigurationLicenseUsageRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QueryConfigurationLicenseUsageRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QueryConfigurationLicenseUsageRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest.class, + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The resource path of the Configuration.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource path of the Configuration.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
+   * Required. The start time for retrieving the usage. If not specified, we
+   * will use the first day of the current billing period.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The start time for retrieving the usage. If not specified, we
+   * will use the first day of the current billing period.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
+   * Required. The start time for retrieving the usage. If not specified, we
+   * will use the first day of the current billing period.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Required. The end time for retrieving the usage. If not specified, we will
+   * use the last day of the current billing period.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The end time for retrieving the usage. If not specified, we will
+   * use the last day of the current billing period.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Required. The end time for retrieving the usage. If not specified, we will
+   * use the last day of the current billing period.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest other = + (com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for requesting license usage per configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest) + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest.class, + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest build() { + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest buildPartial() { + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest result = + new com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest) { + return mergeFrom( + (com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest other) { + if (other + == com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The resource path of the Configuration.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource path of the Configuration.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource path of the Configuration.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource path of the Configuration.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource path of the Configuration.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
+     * Required. The start time for retrieving the usage. If not specified, we
+     * will use the first day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The start time for retrieving the usage. If not specified, we
+     * will use the first day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The start time for retrieving the usage. If not specified, we
+     * will use the first day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The start time for retrieving the usage. If not specified, we
+     * will use the first day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The start time for retrieving the usage. If not specified, we
+     * will use the first day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The start time for retrieving the usage. If not specified, we
+     * will use the first day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000002); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The start time for retrieving the usage. If not specified, we
+     * will use the first day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The start time for retrieving the usage. If not specified, we
+     * will use the first day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + + /** + * + * + *
+     * Required. The start time for retrieving the usage. If not specified, we
+     * will use the first day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Required. The end time for retrieving the usage. If not specified, we will
+     * use the last day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The end time for retrieving the usage. If not specified, we will
+     * use the last day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The end time for retrieving the usage. If not specified, we will
+     * use the last day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The end time for retrieving the usage. If not specified, we will
+     * use the last day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The end time for retrieving the usage. If not specified, we will
+     * use the last day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The end time for retrieving the usage. If not specified, we will
+     * use the last day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The end time for retrieving the usage. If not specified, we will
+     * use the last day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The end time for retrieving the usage. If not specified, we will
+     * use the last day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Required. The end time for retrieving the usage. If not specified, we will
+     * use the last day of the current billing period.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest) + private static final com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest(); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryConfigurationLicenseUsageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/QueryConfigurationLicenseUsageRequestOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/QueryConfigurationLicenseUsageRequestOrBuilder.java new file mode 100644 index 000000000000..5b0ea5e9b5ba --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/QueryConfigurationLicenseUsageRequestOrBuilder.java @@ -0,0 +1,139 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface QueryConfigurationLicenseUsageRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource path of the Configuration.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The resource path of the Configuration.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The start time for retrieving the usage. If not specified, we
+   * will use the first day of the current billing period.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
+   * Required. The start time for retrieving the usage. If not specified, we
+   * will use the first day of the current billing period.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
+   * Required. The start time for retrieving the usage. If not specified, we
+   * will use the first day of the current billing period.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Required. The end time for retrieving the usage. If not specified, we will
+   * use the last day of the current billing period.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Required. The end time for retrieving the usage. If not specified, we will
+   * use the last day of the current billing period.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Required. The end time for retrieving the usage. If not specified, we will
+   * use the last day of the current billing period.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/QueryConfigurationLicenseUsageResponse.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/QueryConfigurationLicenseUsageResponse.java new file mode 100644 index 000000000000..36d6d46c6924 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/QueryConfigurationLicenseUsageResponse.java @@ -0,0 +1,854 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for response to get the license usage per configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse} + */ +public final class QueryConfigurationLicenseUsageResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse) + QueryConfigurationLicenseUsageResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use QueryConfigurationLicenseUsageResponse.newBuilder() to construct. + private QueryConfigurationLicenseUsageResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QueryConfigurationLicenseUsageResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QueryConfigurationLicenseUsageResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse.class, + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse.Builder + .class); + } + + private int detailsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object details_; + + public enum DetailsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + USER_COUNT_USAGE(1), + DETAILS_NOT_SET(0); + private final int value; + + private DetailsCase(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 DetailsCase valueOf(int value) { + return forNumber(value); + } + + public static DetailsCase forNumber(int value) { + switch (value) { + case 1: + return USER_COUNT_USAGE; + case 0: + return DETAILS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DetailsCase getDetailsCase() { + return DetailsCase.forNumber(detailsCase_); + } + + public static final int USER_COUNT_USAGE_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Usage information for license types which use user-count billing.
+   * 
+ * + * .google.cloud.licensemanager.v1.UserCountUsage user_count_usage = 1; + * + * @return Whether the userCountUsage field is set. + */ + @java.lang.Override + public boolean hasUserCountUsage() { + return detailsCase_ == 1; + } + + /** + * + * + *
+   * Usage information for license types which use user-count billing.
+   * 
+ * + * .google.cloud.licensemanager.v1.UserCountUsage user_count_usage = 1; + * + * @return The userCountUsage. + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.UserCountUsage getUserCountUsage() { + if (detailsCase_ == 1) { + return (com.google.cloud.licensemanager.v1.UserCountUsage) details_; + } + return com.google.cloud.licensemanager.v1.UserCountUsage.getDefaultInstance(); + } + + /** + * + * + *
+   * Usage information for license types which use user-count billing.
+   * 
+ * + * .google.cloud.licensemanager.v1.UserCountUsage user_count_usage = 1; + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.UserCountUsageOrBuilder getUserCountUsageOrBuilder() { + if (detailsCase_ == 1) { + return (com.google.cloud.licensemanager.v1.UserCountUsage) details_; + } + return com.google.cloud.licensemanager.v1.UserCountUsage.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 (detailsCase_ == 1) { + output.writeMessage(1, (com.google.cloud.licensemanager.v1.UserCountUsage) details_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (detailsCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.licensemanager.v1.UserCountUsage) details_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse other = + (com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse) obj; + + if (!getDetailsCase().equals(other.getDetailsCase())) return false; + switch (detailsCase_) { + case 1: + if (!getUserCountUsage().equals(other.getUserCountUsage())) 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 (detailsCase_) { + case 1: + hash = (37 * hash) + USER_COUNT_USAGE_FIELD_NUMBER; + hash = (53 * hash) + getUserCountUsage().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for response to get the license usage per configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse) + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse.class, + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (userCountUsageBuilder_ != null) { + userCountUsageBuilder_.clear(); + } + detailsCase_ = 0; + details_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_QueryConfigurationLicenseUsageResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse build() { + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + buildPartial() { + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse result = + new com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse result) { + result.detailsCase_ = detailsCase_; + result.details_ = this.details_; + if (detailsCase_ == 1 && userCountUsageBuilder_ != null) { + result.details_ = userCountUsageBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse) { + return mergeFrom( + (com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse other) { + if (other + == com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + .getDefaultInstance()) return this; + switch (other.getDetailsCase()) { + case USER_COUNT_USAGE: + { + mergeUserCountUsage(other.getUserCountUsage()); + break; + } + case DETAILS_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(getUserCountUsageFieldBuilder().getBuilder(), extensionRegistry); + detailsCase_ = 1; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int detailsCase_ = 0; + private java.lang.Object details_; + + public DetailsCase getDetailsCase() { + return DetailsCase.forNumber(detailsCase_); + } + + public Builder clearDetails() { + detailsCase_ = 0; + details_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.UserCountUsage, + com.google.cloud.licensemanager.v1.UserCountUsage.Builder, + com.google.cloud.licensemanager.v1.UserCountUsageOrBuilder> + userCountUsageBuilder_; + + /** + * + * + *
+     * Usage information for license types which use user-count billing.
+     * 
+ * + * .google.cloud.licensemanager.v1.UserCountUsage user_count_usage = 1; + * + * @return Whether the userCountUsage field is set. + */ + @java.lang.Override + public boolean hasUserCountUsage() { + return detailsCase_ == 1; + } + + /** + * + * + *
+     * Usage information for license types which use user-count billing.
+     * 
+ * + * .google.cloud.licensemanager.v1.UserCountUsage user_count_usage = 1; + * + * @return The userCountUsage. + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.UserCountUsage getUserCountUsage() { + if (userCountUsageBuilder_ == null) { + if (detailsCase_ == 1) { + return (com.google.cloud.licensemanager.v1.UserCountUsage) details_; + } + return com.google.cloud.licensemanager.v1.UserCountUsage.getDefaultInstance(); + } else { + if (detailsCase_ == 1) { + return userCountUsageBuilder_.getMessage(); + } + return com.google.cloud.licensemanager.v1.UserCountUsage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Usage information for license types which use user-count billing.
+     * 
+ * + * .google.cloud.licensemanager.v1.UserCountUsage user_count_usage = 1; + */ + public Builder setUserCountUsage(com.google.cloud.licensemanager.v1.UserCountUsage value) { + if (userCountUsageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + userCountUsageBuilder_.setMessage(value); + } + detailsCase_ = 1; + return this; + } + + /** + * + * + *
+     * Usage information for license types which use user-count billing.
+     * 
+ * + * .google.cloud.licensemanager.v1.UserCountUsage user_count_usage = 1; + */ + public Builder setUserCountUsage( + com.google.cloud.licensemanager.v1.UserCountUsage.Builder builderForValue) { + if (userCountUsageBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + userCountUsageBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 1; + return this; + } + + /** + * + * + *
+     * Usage information for license types which use user-count billing.
+     * 
+ * + * .google.cloud.licensemanager.v1.UserCountUsage user_count_usage = 1; + */ + public Builder mergeUserCountUsage(com.google.cloud.licensemanager.v1.UserCountUsage value) { + if (userCountUsageBuilder_ == null) { + if (detailsCase_ == 1 + && details_ != com.google.cloud.licensemanager.v1.UserCountUsage.getDefaultInstance()) { + details_ = + com.google.cloud.licensemanager.v1.UserCountUsage.newBuilder( + (com.google.cloud.licensemanager.v1.UserCountUsage) details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 1) { + userCountUsageBuilder_.mergeFrom(value); + } else { + userCountUsageBuilder_.setMessage(value); + } + } + detailsCase_ = 1; + return this; + } + + /** + * + * + *
+     * Usage information for license types which use user-count billing.
+     * 
+ * + * .google.cloud.licensemanager.v1.UserCountUsage user_count_usage = 1; + */ + public Builder clearUserCountUsage() { + if (userCountUsageBuilder_ == null) { + if (detailsCase_ == 1) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 1) { + detailsCase_ = 0; + details_ = null; + } + userCountUsageBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Usage information for license types which use user-count billing.
+     * 
+ * + * .google.cloud.licensemanager.v1.UserCountUsage user_count_usage = 1; + */ + public com.google.cloud.licensemanager.v1.UserCountUsage.Builder getUserCountUsageBuilder() { + return getUserCountUsageFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Usage information for license types which use user-count billing.
+     * 
+ * + * .google.cloud.licensemanager.v1.UserCountUsage user_count_usage = 1; + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.UserCountUsageOrBuilder getUserCountUsageOrBuilder() { + if ((detailsCase_ == 1) && (userCountUsageBuilder_ != null)) { + return userCountUsageBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 1) { + return (com.google.cloud.licensemanager.v1.UserCountUsage) details_; + } + return com.google.cloud.licensemanager.v1.UserCountUsage.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Usage information for license types which use user-count billing.
+     * 
+ * + * .google.cloud.licensemanager.v1.UserCountUsage user_count_usage = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.UserCountUsage, + com.google.cloud.licensemanager.v1.UserCountUsage.Builder, + com.google.cloud.licensemanager.v1.UserCountUsageOrBuilder> + getUserCountUsageFieldBuilder() { + if (userCountUsageBuilder_ == null) { + if (!(detailsCase_ == 1)) { + details_ = com.google.cloud.licensemanager.v1.UserCountUsage.getDefaultInstance(); + } + userCountUsageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.UserCountUsage, + com.google.cloud.licensemanager.v1.UserCountUsage.Builder, + com.google.cloud.licensemanager.v1.UserCountUsageOrBuilder>( + (com.google.cloud.licensemanager.v1.UserCountUsage) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 1; + onChanged(); + return userCountUsageBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse) + private static final com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse(); + } + + public static com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryConfigurationLicenseUsageResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/QueryConfigurationLicenseUsageResponseOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/QueryConfigurationLicenseUsageResponseOrBuilder.java new file mode 100644 index 000000000000..a946eee47e12 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/QueryConfigurationLicenseUsageResponseOrBuilder.java @@ -0,0 +1,66 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface QueryConfigurationLicenseUsageResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Usage information for license types which use user-count billing.
+   * 
+ * + * .google.cloud.licensemanager.v1.UserCountUsage user_count_usage = 1; + * + * @return Whether the userCountUsage field is set. + */ + boolean hasUserCountUsage(); + + /** + * + * + *
+   * Usage information for license types which use user-count billing.
+   * 
+ * + * .google.cloud.licensemanager.v1.UserCountUsage user_count_usage = 1; + * + * @return The userCountUsage. + */ + com.google.cloud.licensemanager.v1.UserCountUsage getUserCountUsage(); + + /** + * + * + *
+   * Usage information for license types which use user-count billing.
+   * 
+ * + * .google.cloud.licensemanager.v1.UserCountUsage user_count_usage = 1; + */ + com.google.cloud.licensemanager.v1.UserCountUsageOrBuilder getUserCountUsageOrBuilder(); + + com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse.DetailsCase + getDetailsCase(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ReactivateConfigurationRequest.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ReactivateConfigurationRequest.java new file mode 100644 index 000000000000..39df3d28c3d6 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ReactivateConfigurationRequest.java @@ -0,0 +1,946 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for resuming a Configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.ReactivateConfigurationRequest} + */ +public final class ReactivateConfigurationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.ReactivateConfigurationRequest) + ReactivateConfigurationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ReactivateConfigurationRequest.newBuilder() to construct. + private ReactivateConfigurationRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReactivateConfigurationRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReactivateConfigurationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ReactivateConfigurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ReactivateConfigurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest.class, + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * 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. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest other = + (com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for resuming a Configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.ReactivateConfigurationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.ReactivateConfigurationRequest) + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ReactivateConfigurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ReactivateConfigurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest.class, + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_ReactivateConfigurationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest + getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest build() { + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest buildPartial() { + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest result = + new com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest) { + return mergeFrom((com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest other) { + if (other + == com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.ReactivateConfigurationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.ReactivateConfigurationRequest) + private static final com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest(); + } + + public static com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReactivateConfigurationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ReactivateConfigurationRequestOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ReactivateConfigurationRequestOrBuilder.java new file mode 100644 index 000000000000..83add7793f0c --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/ReactivateConfigurationRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface ReactivateConfigurationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.ReactivateConfigurationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UpdateConfigurationRequest.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UpdateConfigurationRequest.java new file mode 100644 index 000000000000..64747a96ba4d --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UpdateConfigurationRequest.java @@ -0,0 +1,1391 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message for updating a Configuration
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.UpdateConfigurationRequest} + */ +public final class UpdateConfigurationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.UpdateConfigurationRequest) + UpdateConfigurationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateConfigurationRequest.newBuilder() to construct. + private UpdateConfigurationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateConfigurationRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateConfigurationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_UpdateConfigurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_UpdateConfigurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest.class, + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Configuration resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Configuration resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Configuration resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int CONFIGURATION_FIELD_NUMBER = 2; + private com.google.cloud.licensemanager.v1.Configuration configuration_; + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the configuration field is set. + */ + @java.lang.Override + public boolean hasConfiguration() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The configuration. + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.Configuration getConfiguration() { + return configuration_ == null + ? com.google.cloud.licensemanager.v1.Configuration.getDefaultInstance() + : configuration_; + } + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.licensemanager.v1.ConfigurationOrBuilder getConfigurationOrBuilder() { + return configuration_ == null + ? com.google.cloud.licensemanager.v1.Configuration.getDefaultInstance() + : configuration_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getConfiguration()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConfiguration()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.UpdateConfigurationRequest)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest other = + (com.google.cloud.licensemanager.v1.UpdateConfigurationRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasConfiguration() != other.hasConfiguration()) return false; + if (hasConfiguration()) { + if (!getConfiguration().equals(other.getConfiguration())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasConfiguration()) { + hash = (37 * hash) + CONFIGURATION_FIELD_NUMBER; + hash = (53 * hash) + getConfiguration().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.UpdateConfigurationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.UpdateConfigurationRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.UpdateConfigurationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.UpdateConfigurationRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.UpdateConfigurationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.UpdateConfigurationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.UpdateConfigurationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.UpdateConfigurationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.UpdateConfigurationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.UpdateConfigurationRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.UpdateConfigurationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.UpdateConfigurationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for updating a Configuration
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.UpdateConfigurationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.UpdateConfigurationRequest) + com.google.cloud.licensemanager.v1.UpdateConfigurationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_UpdateConfigurationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_UpdateConfigurationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest.class, + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.UpdateConfigurationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getUpdateMaskFieldBuilder(); + getConfigurationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + configuration_ = null; + if (configurationBuilder_ != null) { + configurationBuilder_.dispose(); + configurationBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.LicenseManagerProto + .internal_static_google_cloud_licensemanager_v1_UpdateConfigurationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.UpdateConfigurationRequest + getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.UpdateConfigurationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.UpdateConfigurationRequest build() { + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.UpdateConfigurationRequest buildPartial() { + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest result = + new com.google.cloud.licensemanager.v1.UpdateConfigurationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.licensemanager.v1.UpdateConfigurationRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.configuration_ = + configurationBuilder_ == null ? configuration_ : configurationBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.UpdateConfigurationRequest) { + return mergeFrom((com.google.cloud.licensemanager.v1.UpdateConfigurationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.UpdateConfigurationRequest other) { + if (other + == com.google.cloud.licensemanager.v1.UpdateConfigurationRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasConfiguration()) { + mergeConfiguration(other.getConfiguration()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getConfigurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Configuration resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Configuration resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Configuration resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Configuration resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Configuration resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Configuration resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Configuration resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Configuration resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Configuration resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.licensemanager.v1.Configuration configuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.Configuration, + com.google.cloud.licensemanager.v1.Configuration.Builder, + com.google.cloud.licensemanager.v1.ConfigurationOrBuilder> + configurationBuilder_; + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the configuration field is set. + */ + public boolean hasConfiguration() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The configuration. + */ + public com.google.cloud.licensemanager.v1.Configuration getConfiguration() { + if (configurationBuilder_ == null) { + return configuration_ == null + ? com.google.cloud.licensemanager.v1.Configuration.getDefaultInstance() + : configuration_; + } else { + return configurationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfiguration(com.google.cloud.licensemanager.v1.Configuration value) { + if (configurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configuration_ = value; + } else { + configurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfiguration( + com.google.cloud.licensemanager.v1.Configuration.Builder builderForValue) { + if (configurationBuilder_ == null) { + configuration_ = builderForValue.build(); + } else { + configurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeConfiguration(com.google.cloud.licensemanager.v1.Configuration value) { + if (configurationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && configuration_ != null + && configuration_ + != com.google.cloud.licensemanager.v1.Configuration.getDefaultInstance()) { + getConfigurationBuilder().mergeFrom(value); + } else { + configuration_ = value; + } + } else { + configurationBuilder_.mergeFrom(value); + } + if (configuration_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConfiguration() { + bitField0_ = (bitField0_ & ~0x00000002); + configuration_ = null; + if (configurationBuilder_ != null) { + configurationBuilder_.dispose(); + configurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.licensemanager.v1.Configuration.Builder getConfigurationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getConfigurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.licensemanager.v1.ConfigurationOrBuilder getConfigurationOrBuilder() { + if (configurationBuilder_ != null) { + return configurationBuilder_.getMessageOrBuilder(); + } else { + return configuration_ == null + ? com.google.cloud.licensemanager.v1.Configuration.getDefaultInstance() + : configuration_; + } + } + + /** + * + * + *
+     * Required. The resource being updated
+     * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.Configuration, + com.google.cloud.licensemanager.v1.Configuration.Builder, + com.google.cloud.licensemanager.v1.ConfigurationOrBuilder> + getConfigurationFieldBuilder() { + if (configurationBuilder_ == null) { + configurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.licensemanager.v1.Configuration, + com.google.cloud.licensemanager.v1.Configuration.Builder, + com.google.cloud.licensemanager.v1.ConfigurationOrBuilder>( + getConfiguration(), getParentForChildren(), isClean()); + configuration_ = null; + } + return configurationBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.UpdateConfigurationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.UpdateConfigurationRequest) + private static final com.google.cloud.licensemanager.v1.UpdateConfigurationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.UpdateConfigurationRequest(); + } + + public static com.google.cloud.licensemanager.v1.UpdateConfigurationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateConfigurationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.UpdateConfigurationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UpdateConfigurationRequestOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UpdateConfigurationRequestOrBuilder.java new file mode 100644 index 000000000000..9c618759159e --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UpdateConfigurationRequestOrBuilder.java @@ -0,0 +1,175 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/licensemanager.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface UpdateConfigurationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.UpdateConfigurationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Configuration resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Configuration resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Configuration resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the configuration field is set. + */ + boolean hasConfiguration(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The configuration. + */ + com.google.cloud.licensemanager.v1.Configuration getConfiguration(); + + /** + * + * + *
+   * Required. The resource being updated
+   * 
+ * + * + * .google.cloud.licensemanager.v1.Configuration configuration = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.licensemanager.v1.ConfigurationOrBuilder getConfigurationOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/Usage.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/Usage.java new file mode 100644 index 000000000000..e16a678cf4a2 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/Usage.java @@ -0,0 +1,736 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/api_entities.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message describing total counts of users who accessed a VM.
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.Usage} + */ +public final class Usage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.Usage) + UsageOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Usage.newBuilder() to construct. + private Usage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Usage() { + limaInstance_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Usage(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Usage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Usage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.Usage.class, + com.google.cloud.licensemanager.v1.Usage.Builder.class); + } + + public static final int LIMA_INSTANCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object limaInstance_ = ""; + + /** + * + * + *
+   * LiMa Instance resource name, i.e.
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string lima_instance = 1 [(.google.api.resource_reference) = { ... } + * + * @return The limaInstance. + */ + @java.lang.Override + public java.lang.String getLimaInstance() { + java.lang.Object ref = limaInstance_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + limaInstance_ = s; + return s; + } + } + + /** + * + * + *
+   * LiMa Instance resource name, i.e.
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string lima_instance = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for limaInstance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLimaInstanceBytes() { + java.lang.Object ref = limaInstance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + limaInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERS_FIELD_NUMBER = 2; + private int users_ = 0; + + /** + * + * + *
+   * Number of unique users accessing the VM.
+   * 
+ * + * int32 users = 2; + * + * @return The users. + */ + @java.lang.Override + public int getUsers() { + return users_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(limaInstance_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, limaInstance_); + } + if (users_ != 0) { + output.writeInt32(2, users_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(limaInstance_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, limaInstance_); + } + if (users_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, users_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.Usage)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.Usage other = (com.google.cloud.licensemanager.v1.Usage) obj; + + if (!getLimaInstance().equals(other.getLimaInstance())) return false; + if (getUsers() != other.getUsers()) return false; + if (!getUnknownFields().equals(other.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) + LIMA_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getLimaInstance().hashCode(); + hash = (37 * hash) + USERS_FIELD_NUMBER; + hash = (53 * hash) + getUsers(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.Usage parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.Usage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Usage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.Usage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Usage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.Usage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Usage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.Usage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Usage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.Usage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.Usage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.Usage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.licensemanager.v1.Usage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message describing total counts of users who accessed a VM.
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.Usage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.Usage) + com.google.cloud.licensemanager.v1.UsageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Usage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Usage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.Usage.class, + com.google.cloud.licensemanager.v1.Usage.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.Usage.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + limaInstance_ = ""; + users_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_Usage_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.Usage getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.Usage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.Usage build() { + com.google.cloud.licensemanager.v1.Usage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.Usage buildPartial() { + com.google.cloud.licensemanager.v1.Usage result = + new com.google.cloud.licensemanager.v1.Usage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.Usage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.limaInstance_ = limaInstance_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.users_ = users_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.Usage) { + return mergeFrom((com.google.cloud.licensemanager.v1.Usage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.Usage other) { + if (other == com.google.cloud.licensemanager.v1.Usage.getDefaultInstance()) return this; + if (!other.getLimaInstance().isEmpty()) { + limaInstance_ = other.limaInstance_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getUsers() != 0) { + setUsers(other.getUsers()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + limaInstance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + users_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object limaInstance_ = ""; + + /** + * + * + *
+     * LiMa Instance resource name, i.e.
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string lima_instance = 1 [(.google.api.resource_reference) = { ... } + * + * @return The limaInstance. + */ + public java.lang.String getLimaInstance() { + java.lang.Object ref = limaInstance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + limaInstance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * LiMa Instance resource name, i.e.
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string lima_instance = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for limaInstance. + */ + public com.google.protobuf.ByteString getLimaInstanceBytes() { + java.lang.Object ref = limaInstance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + limaInstance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * LiMa Instance resource name, i.e.
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string lima_instance = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The limaInstance to set. + * @return This builder for chaining. + */ + public Builder setLimaInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + limaInstance_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * LiMa Instance resource name, i.e.
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string lima_instance = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearLimaInstance() { + limaInstance_ = getDefaultInstance().getLimaInstance(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * LiMa Instance resource name, i.e.
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * string lima_instance = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for limaInstance to set. + * @return This builder for chaining. + */ + public Builder setLimaInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + limaInstance_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int users_; + + /** + * + * + *
+     * Number of unique users accessing the VM.
+     * 
+ * + * int32 users = 2; + * + * @return The users. + */ + @java.lang.Override + public int getUsers() { + return users_; + } + + /** + * + * + *
+     * Number of unique users accessing the VM.
+     * 
+ * + * int32 users = 2; + * + * @param value The users to set. + * @return This builder for chaining. + */ + public Builder setUsers(int value) { + + users_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Number of unique users accessing the VM.
+     * 
+ * + * int32 users = 2; + * + * @return This builder for chaining. + */ + public Builder clearUsers() { + bitField0_ = (bitField0_ & ~0x00000002); + users_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.Usage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.Usage) + private static final com.google.cloud.licensemanager.v1.Usage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.Usage(); + } + + public static com.google.cloud.licensemanager.v1.Usage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Usage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.Usage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UsageOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UsageOrBuilder.java new file mode 100644 index 000000000000..9b48bcd44978 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UsageOrBuilder.java @@ -0,0 +1,67 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/api_entities.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface UsageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.Usage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * LiMa Instance resource name, i.e.
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string lima_instance = 1 [(.google.api.resource_reference) = { ... } + * + * @return The limaInstance. + */ + java.lang.String getLimaInstance(); + + /** + * + * + *
+   * LiMa Instance resource name, i.e.
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * string lima_instance = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for limaInstance. + */ + com.google.protobuf.ByteString getLimaInstanceBytes(); + + /** + * + * + *
+   * Number of unique users accessing the VM.
+   * 
+ * + * int32 users = 2; + * + * @return The users. + */ + int getUsers(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UserCountBillingInfo.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UserCountBillingInfo.java new file mode 100644 index 000000000000..73199926bf4c --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UserCountBillingInfo.java @@ -0,0 +1,542 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/api_entities.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * This approach uses total unique user count for billing.
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.UserCountBillingInfo} + */ +public final class UserCountBillingInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.UserCountBillingInfo) + UserCountBillingInfoOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UserCountBillingInfo.newBuilder() to construct. + private UserCountBillingInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UserCountBillingInfo() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UserCountBillingInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_UserCountBillingInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_UserCountBillingInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.UserCountBillingInfo.class, + com.google.cloud.licensemanager.v1.UserCountBillingInfo.Builder.class); + } + + public static final int USER_COUNT_FIELD_NUMBER = 1; + private int userCount_ = 0; + + /** + * + * + *
+   * Required. Number of users to bill for.
+   * 
+ * + * int32 user_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userCount. + */ + @java.lang.Override + public int getUserCount() { + return userCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (userCount_ != 0) { + output.writeInt32(1, userCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (userCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, userCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.UserCountBillingInfo)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.UserCountBillingInfo other = + (com.google.cloud.licensemanager.v1.UserCountBillingInfo) obj; + + if (getUserCount() != other.getUserCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getUserCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.UserCountBillingInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.UserCountBillingInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.UserCountBillingInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.UserCountBillingInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.UserCountBillingInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.UserCountBillingInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.UserCountBillingInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.UserCountBillingInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.UserCountBillingInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.UserCountBillingInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.UserCountBillingInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.UserCountBillingInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.licensemanager.v1.UserCountBillingInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * This approach uses total unique user count for billing.
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.UserCountBillingInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.UserCountBillingInfo) + com.google.cloud.licensemanager.v1.UserCountBillingInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_UserCountBillingInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_UserCountBillingInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.UserCountBillingInfo.class, + com.google.cloud.licensemanager.v1.UserCountBillingInfo.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.UserCountBillingInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_UserCountBillingInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.UserCountBillingInfo getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.UserCountBillingInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.UserCountBillingInfo build() { + com.google.cloud.licensemanager.v1.UserCountBillingInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.UserCountBillingInfo buildPartial() { + com.google.cloud.licensemanager.v1.UserCountBillingInfo result = + new com.google.cloud.licensemanager.v1.UserCountBillingInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.UserCountBillingInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userCount_ = userCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.UserCountBillingInfo) { + return mergeFrom((com.google.cloud.licensemanager.v1.UserCountBillingInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.UserCountBillingInfo other) { + if (other == com.google.cloud.licensemanager.v1.UserCountBillingInfo.getDefaultInstance()) + return this; + if (other.getUserCount() != 0) { + setUserCount(other.getUserCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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: + { + userCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int userCount_; + + /** + * + * + *
+     * Required. Number of users to bill for.
+     * 
+ * + * int32 user_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userCount. + */ + @java.lang.Override + public int getUserCount() { + return userCount_; + } + + /** + * + * + *
+     * Required. Number of users to bill for.
+     * 
+ * + * int32 user_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The userCount to set. + * @return This builder for chaining. + */ + public Builder setUserCount(int value) { + + userCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Number of users to bill for.
+     * 
+ * + * int32 user_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUserCount() { + bitField0_ = (bitField0_ & ~0x00000001); + userCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.UserCountBillingInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.UserCountBillingInfo) + private static final com.google.cloud.licensemanager.v1.UserCountBillingInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.UserCountBillingInfo(); + } + + public static com.google.cloud.licensemanager.v1.UserCountBillingInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserCountBillingInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.UserCountBillingInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UserCountBillingInfoOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UserCountBillingInfoOrBuilder.java new file mode 100644 index 000000000000..873dcce9f83d --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UserCountBillingInfoOrBuilder.java @@ -0,0 +1,39 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/api_entities.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface UserCountBillingInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.UserCountBillingInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Number of users to bill for.
+   * 
+ * + * int32 user_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userCount. + */ + int getUserCount(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UserCountUsage.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UserCountUsage.java new file mode 100644 index 000000000000..a23f7b8a39f3 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UserCountUsage.java @@ -0,0 +1,543 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/api_entities.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +/** + * + * + *
+ * Message representing usage for license configurations which use user-count
+ * billing.
+ * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.UserCountUsage} + */ +public final class UserCountUsage extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.licensemanager.v1.UserCountUsage) + UserCountUsageOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UserCountUsage.newBuilder() to construct. + private UserCountUsage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UserCountUsage() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UserCountUsage(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_UserCountUsage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_UserCountUsage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.UserCountUsage.class, + com.google.cloud.licensemanager.v1.UserCountUsage.Builder.class); + } + + public static final int UNIQUE_USER_COUNT_FIELD_NUMBER = 1; + private int uniqueUserCount_ = 0; + + /** + * + * + *
+   * Required. Unique number of licensed users.
+   * 
+ * + * int32 unique_user_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uniqueUserCount. + */ + @java.lang.Override + public int getUniqueUserCount() { + return uniqueUserCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (uniqueUserCount_ != 0) { + output.writeInt32(1, uniqueUserCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (uniqueUserCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, uniqueUserCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.licensemanager.v1.UserCountUsage)) { + return super.equals(obj); + } + com.google.cloud.licensemanager.v1.UserCountUsage other = + (com.google.cloud.licensemanager.v1.UserCountUsage) obj; + + if (getUniqueUserCount() != other.getUniqueUserCount()) return false; + if (!getUnknownFields().equals(other.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) + UNIQUE_USER_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getUniqueUserCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.licensemanager.v1.UserCountUsage parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.UserCountUsage parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.UserCountUsage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.UserCountUsage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.UserCountUsage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.licensemanager.v1.UserCountUsage parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.UserCountUsage parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.UserCountUsage parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.UserCountUsage parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.UserCountUsage parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.licensemanager.v1.UserCountUsage parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.licensemanager.v1.UserCountUsage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.licensemanager.v1.UserCountUsage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message representing usage for license configurations which use user-count
+   * billing.
+   * 
+ * + * Protobuf type {@code google.cloud.licensemanager.v1.UserCountUsage} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.licensemanager.v1.UserCountUsage) + com.google.cloud.licensemanager.v1.UserCountUsageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_UserCountUsage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_UserCountUsage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.licensemanager.v1.UserCountUsage.class, + com.google.cloud.licensemanager.v1.UserCountUsage.Builder.class); + } + + // Construct using com.google.cloud.licensemanager.v1.UserCountUsage.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uniqueUserCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.licensemanager.v1.ApiEntitiesProto + .internal_static_google_cloud_licensemanager_v1_UserCountUsage_descriptor; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.UserCountUsage getDefaultInstanceForType() { + return com.google.cloud.licensemanager.v1.UserCountUsage.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.UserCountUsage build() { + com.google.cloud.licensemanager.v1.UserCountUsage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.UserCountUsage buildPartial() { + com.google.cloud.licensemanager.v1.UserCountUsage result = + new com.google.cloud.licensemanager.v1.UserCountUsage(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.licensemanager.v1.UserCountUsage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uniqueUserCount_ = uniqueUserCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.licensemanager.v1.UserCountUsage) { + return mergeFrom((com.google.cloud.licensemanager.v1.UserCountUsage) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.licensemanager.v1.UserCountUsage other) { + if (other == com.google.cloud.licensemanager.v1.UserCountUsage.getDefaultInstance()) + return this; + if (other.getUniqueUserCount() != 0) { + setUniqueUserCount(other.getUniqueUserCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == 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: + { + uniqueUserCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int uniqueUserCount_; + + /** + * + * + *
+     * Required. Unique number of licensed users.
+     * 
+ * + * int32 unique_user_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uniqueUserCount. + */ + @java.lang.Override + public int getUniqueUserCount() { + return uniqueUserCount_; + } + + /** + * + * + *
+     * Required. Unique number of licensed users.
+     * 
+ * + * int32 unique_user_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The uniqueUserCount to set. + * @return This builder for chaining. + */ + public Builder setUniqueUserCount(int value) { + + uniqueUserCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Unique number of licensed users.
+     * 
+ * + * int32 unique_user_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUniqueUserCount() { + bitField0_ = (bitField0_ & ~0x00000001); + uniqueUserCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.licensemanager.v1.UserCountUsage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.licensemanager.v1.UserCountUsage) + private static final com.google.cloud.licensemanager.v1.UserCountUsage DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.licensemanager.v1.UserCountUsage(); + } + + public static com.google.cloud.licensemanager.v1.UserCountUsage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserCountUsage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.licensemanager.v1.UserCountUsage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UserCountUsageOrBuilder.java b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UserCountUsageOrBuilder.java new file mode 100644 index 000000000000..18231e0762d1 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/java/com/google/cloud/licensemanager/v1/UserCountUsageOrBuilder.java @@ -0,0 +1,39 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/licensemanager/v1/api_entities.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.licensemanager.v1; + +public interface UserCountUsageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.licensemanager.v1.UserCountUsage) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Unique number of licensed users.
+   * 
+ * + * int32 unique_user_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uniqueUserCount. + */ + int getUniqueUserCount(); +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/proto/google/cloud/licensemanager/v1/api_entities.proto b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/proto/google/cloud/licensemanager/v1/api_entities.proto new file mode 100644 index 000000000000..e36a9b65fd16 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/proto/google/cloud/licensemanager/v1/api_entities.proto @@ -0,0 +1,295 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.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.licensemanager.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.LicenseManager.V1"; +option go_package = "cloud.google.com/go/licensemanager/apiv1/licensemanagerpb;licensemanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "ApiEntitiesProto"; +option java_package = "com.google.cloud.licensemanager.v1"; +option php_namespace = "Google\\Cloud\\LicenseManager\\V1"; +option ruby_package = "Google::Cloud::LicenseManager::V1"; + +// Different types of licenses that are supported. +enum LicenseType { + // unspecified. + LICENSE_TYPE_UNSPECIFIED = 0; + + // Billing will be based on number of users listed per month. + LICENSE_TYPE_PER_MONTH_PER_USER = 1; + + // Bring your own license. + LICENSE_TYPE_BRING_YOUR_OWN_LICENSE = 2; +} + +// State of the License Key activation on the instance. +enum ActivationState { + // The Status of the activation is unspecified + ACTIVATION_STATE_UNSPECIFIED = 0; + + // Activation key (MAK) requested for the instance. + ACTIVATION_STATE_KEY_REQUESTED = 1; + + // License activation process is running on the instance. + ACTIVATION_STATE_ACTIVATING = 2; + + // License activation is complete on the instance. + ACTIVATION_STATE_ACTIVATED = 3; + + // License Key is deactivating on the instance. + ACTIVATION_STATE_DEACTIVATING = 4; + + // License Key is deactivated on the instance. + ACTIVATION_STATE_DEACTIVATED = 5; + + // License Key activation failed on the instance. + ACTIVATION_STATE_TERMINATED = 6; +} + +// Configuration for a Google SPLA product +message Configuration { + option (google.api.resource) = { + type: "licensemanager.googleapis.com/Configuration" + pattern: "projects/{project}/locations/{location}/configurations/{configuration}" + plural: "configurations" + singular: "configuration" + }; + + // State of the configuration. + enum State { + // The Status of the configuration is unspecified + STATE_UNSPECIFIED = 0; + + // Configuration is in active state. + STATE_ACTIVE = 1; + + // Configuration is in deactivated state. + STATE_SUSPENDED = 2; + + // Configuration is in deleted state. + STATE_DELETED = 3; + } + + // Identifier. name of resource + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. User given name. + string display_name = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name field (with URL) of the Product offered for SPLA. + string product = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Product" + } + ]; + + // Required. LicenseType to be applied for billing + LicenseType license_type = 7 [(google.api.field_behavior) = REQUIRED]; + + // Required. Billing information applicable till end of the current month. + BillingInfo current_billing_info = 8 [(google.api.field_behavior) = REQUIRED]; + + // Required. Billing information applicable for next month. + BillingInfo next_billing_info = 9 [(google.api.field_behavior) = REQUIRED]; + + // Output only. [Output only] Create time stamp + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. [Output only] Update time stamp + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels as key value pairs + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. State of the configuration. + State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Billing Information. +message BillingInfo { + oneof current_billing_info { + // Required. This type of billing uses user count for computing total + // charge. + UserCountBillingInfo user_count_billing = 1 + [(google.api.field_behavior) = REQUIRED]; + } + + // Output only. When the billing starts. + google.protobuf.Timestamp start_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the billing ends. + google.protobuf.Timestamp end_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// This approach uses total unique user count for billing. +message UserCountBillingInfo { + // Required. Number of users to bill for. + int32 user_count = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Message representing usage for license configurations which use user-count +// billing. +message UserCountUsage { + // Required. Unique number of licensed users. + int32 unique_user_count = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Products for Google SPLA. +message Product { + option (google.api.resource) = { + type: "licensemanager.googleapis.com/Product" + pattern: "projects/{project}/locations/{location}/products/{product}" + plural: "products" + singular: "product" + }; + + // State of the product. + enum State { + // The Status of the product is unknown. + STATE_UNSPECIFIED = 0; + + // Product is under provisioning stage. + STATE_PROVISIONING = 1; + + // Product is ok to run on instances. + STATE_RUNNING = 2; + + // The product is about to terminate or has been announced for termination. + STATE_TERMINATING = 3; + + // The product has been terminated. + STATE_TERMINATED = 4; + } + + // Identifier. Full name of the product resource. + // ex "projects/1/locations/us-central1/products/office-2021" + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. Version of the product. + string version = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Company that released the product. + string product_company = 3 [(google.api.field_behavior) = REQUIRED]; + + // Output only. State of the product. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. SKU for mapping to the Billing/Subscription resource. + string sku = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Human-readable, detailed description of the Product + string description = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Human-readable name of the Product + string display_name = 7 [(google.api.field_behavior) = REQUIRED]; +} + +// Message describing Instance object +message Instance { + option (google.api.resource) = { + type: "licensemanager.googleapis.com/Instance" + pattern: "projects/{project}/locations/{location}/instances/{instance}" + plural: "instances" + singular: "instance" + }; + + // VM status enum. + enum State { + // The Status of the VM is unspecified. + STATE_UNSPECIFIED = 0; + + // Resources are being allocated for the instance. + PROVISIONING = 1; + + // All required resources have been allocated and + // the instance is being started. + STAGING = 2; + + // The instance is running. + RUNNING = 3; + + // The instance is currently stopping (either being deleted or terminated). + STOPPING = 4; + + // The instance has stopped due to various reasons (user request, VM + // preemption, project freezing, etc.). + STOPPED = 5; + + // The instance has failed in some way. + TERMINATED = 6; + + // The instance is in repair. + REPAIRING = 7; + } + + // Identifier. name of resource + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. [Output only] Create time stamp + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. [Output only] Update time stamp + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels as key value pairs + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The state of the VM. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The location of the VM. + string region = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Map with Product_Name and Activation State of the VM. + map product_activation = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. license version id. + string license_version_id = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Compute Instance resource name, i.e. + // projects/{project}/zones/{zone}/instances/{instance} + string compute_instance = 9 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/ComputeInstance" + } + ]; +} + +// Message describing total counts of users who accessed a VM. +message Usage { + // LiMa Instance resource name, i.e. + // projects/{project}/locations/{location}/instances/{instance} + string lima_instance = 1 [(google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Instance" + }]; + + // Number of unique users accessing the VM. + int32 users = 2; +} diff --git a/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/proto/google/cloud/licensemanager/v1/licensemanager.proto b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/proto/google/cloud/licensemanager/v1/licensemanager.proto new file mode 100644 index 000000000000..b6a2507b1817 --- /dev/null +++ b/java-licensemanager/proto-google-cloud-licensemanager-v1/src/main/proto/google/cloud/licensemanager/v1/licensemanager.proto @@ -0,0 +1,586 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.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.licensemanager.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/licensemanager/v1/api_entities.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.LicenseManager.V1"; +option go_package = "cloud.google.com/go/licensemanager/apiv1/licensemanagerpb;licensemanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "LicenseManagerProto"; +option java_package = "com.google.cloud.licensemanager.v1"; +option php_namespace = "Google\\Cloud\\LicenseManager\\V1"; +option ruby_package = "Google::Cloud::LicenseManager::V1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/ComputeInstance" + pattern: "projects/{project}/zones/{zone}/instances/{instance}" +}; + +// Service describing handlers for resources +service LicenseManager { + option (google.api.default_host) = "licensemanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists Configurations in a given project and location. + rpc ListConfigurations(ListConfigurationsRequest) + returns (ListConfigurationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/configurations" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Configuration. + rpc GetConfiguration(GetConfigurationRequest) returns (Configuration) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/configurations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Configuration in a given project and location. + rpc CreateConfiguration(CreateConfigurationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/configurations" + body: "configuration" + }; + option (google.api.method_signature) = + "parent,configuration,configuration_id"; + option (google.longrunning.operation_info) = { + response_type: "Configuration" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Configuration. + rpc UpdateConfiguration(UpdateConfigurationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{configuration.name=projects/*/locations/*/configurations/*}" + body: "configuration" + }; + option (google.api.method_signature) = "configuration,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Configuration" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Configuration. + rpc DeleteConfiguration(DeleteConfigurationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/configurations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Instances in a given project and location. + rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/instances" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Instance. + rpc GetInstance(GetInstanceRequest) returns (Instance) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/instances/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deactivates the given configuration. + rpc DeactivateConfiguration(DeactivateConfigurationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/configurations/*}:deactivate" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Configuration" + metadata_type: "OperationMetadata" + }; + } + + // Reactivates the given configuration. + rpc ReactivateConfiguration(ReactivateConfigurationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/configurations/*}:reactivate" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Configuration" + metadata_type: "OperationMetadata" + }; + } + + // License Usage information for a Configuration. + rpc QueryConfigurationLicenseUsage(QueryConfigurationLicenseUsageRequest) + returns (QueryConfigurationLicenseUsageResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/configurations/*}:queryLicenseUsage" + }; + option (google.api.method_signature) = "name,start_time,end_time"; + } + + // Aggregates Usage per Instance for a Configuration. + rpc AggregateUsage(AggregateUsageRequest) returns (AggregateUsageResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/configurations/*}:aggregateUsage" + }; + option (google.api.method_signature) = "name,start_time,end_time"; + } + + // Lists Products in a given project and location. + rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/products" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Product. + rpc GetProduct(GetProductRequest) returns (Product) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/products/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Message for requesting list of Configurations +message ListConfigurationsRequest { + // Required. Parent value for ListConfigurationsRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "licensemanager.googleapis.com/Configuration" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing Configurations +message ListConfigurationsResponse { + // The list of Configuration + repeated Configuration configurations = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a Configuration +message GetConfigurationRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Configuration" + } + ]; +} + +// Message for creating a Configuration +message CreateConfigurationRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "licensemanager.googleapis.com/Configuration" + } + ]; + + // Required. Id of the requesting object + string configuration_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + Configuration configuration = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for updating a Configuration +message UpdateConfigurationRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // Configuration resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource being updated + Configuration configuration = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for deleting a Configuration +message DeleteConfigurationRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Configuration" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for requesting list of Instances +message ListInstancesRequest { + // Required. Parent value for ListInstancesRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "licensemanager.googleapis.com/Instance" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing Instances +message ListInstancesResponse { + // The list of Instance + repeated Instance instances = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a Instance +message GetInstanceRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Instance" + } + ]; +} + +// Message for requesting license usage per configuration. +message QueryConfigurationLicenseUsageRequest { + // Required. The resource path of the Configuration. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Configuration" + } + ]; + + // Required. The start time for retrieving the usage. If not specified, we + // will use the first day of the current billing period. + google.protobuf.Timestamp start_time = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The end time for retrieving the usage. If not specified, we will + // use the last day of the current billing period. + google.protobuf.Timestamp end_time = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Message for response to get the license usage per configuration. +message QueryConfigurationLicenseUsageResponse { + // Depending on the type of the configuration, one of the following + // will be populated. + oneof details { + // Usage information for license types which use user-count billing. + UserCountUsage user_count_usage = 1; + } +} + +// Message for deactivating a Configuration. +message DeactivateConfigurationRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Configuration" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for resuming a Configuration. +message ReactivateConfigurationRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Configuration" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for requesting aggregate of Usage per configuration. +message AggregateUsageRequest { + // Required. Parent value for AggregateUsageRequest + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Configuration" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results + string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Licenses are purchased per month - so usage track needs start + // time of a month. + google.protobuf.Timestamp start_time = 7 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Usage track is always for a month. This parameter is for the end + // time of the month. + google.protobuf.Timestamp end_time = 8 + [(google.api.field_behavior) = REQUIRED]; +} + +// Message for response for aggregating usage count +message AggregateUsageResponse { + // The aggregated records of usage per configuration + repeated Usage usages = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for requesting list of Products +message ListProductsRequest { + // Required. Parent value for ListProductsRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "licensemanager.googleapis.com/Product" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing Products +message ListProductsResponse { + // The list of Product + repeated Product products = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a Product +message GetProductRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Product" + } + ]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have been cancelled successfully + // have + // [google.longrunning.Operation.error][google.longrunning.Operation.error] + // value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/AsyncAggregateUsage.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/AsyncAggregateUsage.java new file mode 100644 index 000000000000..91fbf05bafb9 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/AsyncAggregateUsage.java @@ -0,0 +1,60 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_AggregateUsage_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.licensemanager.v1.AggregateUsageRequest; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.Usage; +import com.google.protobuf.Timestamp; + +public class AsyncAggregateUsage { + + public static void main(String[] args) throws Exception { + asyncAggregateUsage(); + } + + public static void asyncAggregateUsage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + AggregateUsageRequest request = + AggregateUsageRequest.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + ApiFuture future = + licenseManagerClient.aggregateUsagePagedCallable().futureCall(request); + // Do something. + for (Usage element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_AggregateUsage_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/AsyncAggregateUsagePaged.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/AsyncAggregateUsagePaged.java new file mode 100644 index 000000000000..da554e94c21d --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/AsyncAggregateUsagePaged.java @@ -0,0 +1,68 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_AggregateUsage_Paged_async] +import com.google.cloud.licensemanager.v1.AggregateUsageRequest; +import com.google.cloud.licensemanager.v1.AggregateUsageResponse; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.Usage; +import com.google.common.base.Strings; +import com.google.protobuf.Timestamp; + +public class AsyncAggregateUsagePaged { + + public static void main(String[] args) throws Exception { + asyncAggregateUsagePaged(); + } + + public static void asyncAggregateUsagePaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + AggregateUsageRequest request = + AggregateUsageRequest.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + while (true) { + AggregateUsageResponse response = + licenseManagerClient.aggregateUsageCallable().call(request); + for (Usage element : response.getUsagesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_AggregateUsage_Paged_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/SyncAggregateUsage.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/SyncAggregateUsage.java new file mode 100644 index 000000000000..be50ba9612fd --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/SyncAggregateUsage.java @@ -0,0 +1,56 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_AggregateUsage_sync] +import com.google.cloud.licensemanager.v1.AggregateUsageRequest; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.Usage; +import com.google.protobuf.Timestamp; + +public class SyncAggregateUsage { + + public static void main(String[] args) throws Exception { + syncAggregateUsage(); + } + + public static void syncAggregateUsage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + AggregateUsageRequest request = + AggregateUsageRequest.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + for (Usage element : licenseManagerClient.aggregateUsage(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_AggregateUsage_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/SyncAggregateUsageConfigurationnameTimestampTimestamp.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/SyncAggregateUsageConfigurationnameTimestampTimestamp.java new file mode 100644 index 000000000000..577cece86757 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/SyncAggregateUsageConfigurationnameTimestampTimestamp.java @@ -0,0 +1,48 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_AggregateUsage_ConfigurationnameTimestampTimestamp_sync] +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.Usage; +import com.google.protobuf.Timestamp; + +public class SyncAggregateUsageConfigurationnameTimestampTimestamp { + + public static void main(String[] args) throws Exception { + syncAggregateUsageConfigurationnameTimestampTimestamp(); + } + + public static void syncAggregateUsageConfigurationnameTimestampTimestamp() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + for (Usage element : + licenseManagerClient.aggregateUsage(name, startTime, endTime).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_AggregateUsage_ConfigurationnameTimestampTimestamp_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/SyncAggregateUsageStringTimestampTimestamp.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/SyncAggregateUsageStringTimestampTimestamp.java new file mode 100644 index 000000000000..e4845c29af49 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/aggregateusage/SyncAggregateUsageStringTimestampTimestamp.java @@ -0,0 +1,48 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_AggregateUsage_StringTimestampTimestamp_sync] +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.Usage; +import com.google.protobuf.Timestamp; + +public class SyncAggregateUsageStringTimestampTimestamp { + + public static void main(String[] args) throws Exception { + syncAggregateUsageStringTimestampTimestamp(); + } + + public static void syncAggregateUsageStringTimestampTimestamp() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString(); + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + for (Usage element : + licenseManagerClient.aggregateUsage(name, startTime, endTime).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_AggregateUsage_StringTimestampTimestamp_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/create/SyncCreateSetCredentialsProvider.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..53e1f69ad36c --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.LicenseManagerSettings; +import com.google.cloud.licensemanager.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 + LicenseManagerSettings licenseManagerSettings = + LicenseManagerSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + LicenseManagerClient licenseManagerClient = LicenseManagerClient.create(licenseManagerSettings); + } +} +// [END licensemanager_v1_generated_LicenseManager_Create_SetCredentialsProvider_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/create/SyncCreateSetEndpoint.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..febe63bbe78f --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_Create_SetEndpoint_sync] +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.LicenseManagerSettings; +import com.google.cloud.licensemanager.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 + LicenseManagerSettings licenseManagerSettings = + LicenseManagerSettings.newBuilder().setEndpoint(myEndpoint).build(); + LicenseManagerClient licenseManagerClient = LicenseManagerClient.create(licenseManagerSettings); + } +} +// [END licensemanager_v1_generated_LicenseManager_Create_SetEndpoint_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/create/SyncCreateUseHttpJsonTransport.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..254a43840a39 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,40 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_Create_UseHttpJsonTransport_sync] +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.LicenseManagerSettings; + +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 + LicenseManagerSettings licenseManagerSettings = + LicenseManagerSettings.newHttpJsonBuilder().build(); + LicenseManagerClient licenseManagerClient = LicenseManagerClient.create(licenseManagerSettings); + } +} +// [END licensemanager_v1_generated_LicenseManager_Create_UseHttpJsonTransport_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/AsyncCreateConfiguration.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/AsyncCreateConfiguration.java new file mode 100644 index 000000000000..050e61142a2a --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/AsyncCreateConfiguration.java @@ -0,0 +1,54 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_CreateConfiguration_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.CreateConfigurationRequest; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateConfiguration { + + public static void main(String[] args) throws Exception { + asyncCreateConfiguration(); + } + + public static void asyncCreateConfiguration() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + CreateConfigurationRequest request = + CreateConfigurationRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setConfigurationId("configurationId1948915889") + .setConfiguration(Configuration.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + licenseManagerClient.createConfigurationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_CreateConfiguration_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/AsyncCreateConfigurationLRO.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/AsyncCreateConfigurationLRO.java new file mode 100644 index 000000000000..7db7266df408 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/AsyncCreateConfigurationLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_CreateConfiguration_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.CreateConfigurationRequest; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.LocationName; +import com.google.cloud.licensemanager.v1.OperationMetadata; + +public class AsyncCreateConfigurationLRO { + + public static void main(String[] args) throws Exception { + asyncCreateConfigurationLRO(); + } + + public static void asyncCreateConfigurationLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + CreateConfigurationRequest request = + CreateConfigurationRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setConfigurationId("configurationId1948915889") + .setConfiguration(Configuration.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + licenseManagerClient.createConfigurationOperationCallable().futureCall(request); + // Do something. + Configuration response = future.get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_CreateConfiguration_LRO_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/SyncCreateConfiguration.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/SyncCreateConfiguration.java new file mode 100644 index 000000000000..1ec0648462fa --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/SyncCreateConfiguration.java @@ -0,0 +1,49 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_CreateConfiguration_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.CreateConfigurationRequest; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.LocationName; + +public class SyncCreateConfiguration { + + public static void main(String[] args) throws Exception { + syncCreateConfiguration(); + } + + public static void syncCreateConfiguration() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + CreateConfigurationRequest request = + CreateConfigurationRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setConfigurationId("configurationId1948915889") + .setConfiguration(Configuration.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Configuration response = licenseManagerClient.createConfigurationAsync(request).get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_CreateConfiguration_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/SyncCreateConfigurationLocationnameConfigurationString.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/SyncCreateConfigurationLocationnameConfigurationString.java new file mode 100644 index 000000000000..3c9384dd2ca5 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/SyncCreateConfigurationLocationnameConfigurationString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_CreateConfiguration_LocationnameConfigurationString_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.LocationName; + +public class SyncCreateConfigurationLocationnameConfigurationString { + + public static void main(String[] args) throws Exception { + syncCreateConfigurationLocationnameConfigurationString(); + } + + public static void syncCreateConfigurationLocationnameConfigurationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Configuration configuration = Configuration.newBuilder().build(); + String configurationId = "configurationId1948915889"; + Configuration response = + licenseManagerClient + .createConfigurationAsync(parent, configuration, configurationId) + .get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_CreateConfiguration_LocationnameConfigurationString_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/SyncCreateConfigurationStringConfigurationString.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/SyncCreateConfigurationStringConfigurationString.java new file mode 100644 index 000000000000..25c44966edd3 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/createconfiguration/SyncCreateConfigurationStringConfigurationString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_CreateConfiguration_StringConfigurationString_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.LocationName; + +public class SyncCreateConfigurationStringConfigurationString { + + public static void main(String[] args) throws Exception { + syncCreateConfigurationStringConfigurationString(); + } + + public static void syncCreateConfigurationStringConfigurationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Configuration configuration = Configuration.newBuilder().build(); + String configurationId = "configurationId1948915889"; + Configuration response = + licenseManagerClient + .createConfigurationAsync(parent, configuration, configurationId) + .get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_CreateConfiguration_StringConfigurationString_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/AsyncDeactivateConfiguration.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/AsyncDeactivateConfiguration.java new file mode 100644 index 000000000000..17a1c2221e1f --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/AsyncDeactivateConfiguration.java @@ -0,0 +1,52 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_DeactivateConfiguration_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.longrunning.Operation; + +public class AsyncDeactivateConfiguration { + + public static void main(String[] args) throws Exception { + asyncDeactivateConfiguration(); + } + + public static void asyncDeactivateConfiguration() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + DeactivateConfigurationRequest request = + DeactivateConfigurationRequest.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + licenseManagerClient.deactivateConfigurationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_DeactivateConfiguration_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/AsyncDeactivateConfigurationLRO.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/AsyncDeactivateConfigurationLRO.java new file mode 100644 index 000000000000..9e191bf298a3 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/AsyncDeactivateConfigurationLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_DeactivateConfiguration_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.OperationMetadata; + +public class AsyncDeactivateConfigurationLRO { + + public static void main(String[] args) throws Exception { + asyncDeactivateConfigurationLRO(); + } + + public static void asyncDeactivateConfigurationLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + DeactivateConfigurationRequest request = + DeactivateConfigurationRequest.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + licenseManagerClient.deactivateConfigurationOperationCallable().futureCall(request); + // Do something. + Configuration response = future.get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_DeactivateConfiguration_LRO_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/SyncDeactivateConfiguration.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/SyncDeactivateConfiguration.java new file mode 100644 index 000000000000..17e3199e5769 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/SyncDeactivateConfiguration.java @@ -0,0 +1,48 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_DeactivateConfiguration_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.DeactivateConfigurationRequest; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; + +public class SyncDeactivateConfiguration { + + public static void main(String[] args) throws Exception { + syncDeactivateConfiguration(); + } + + public static void syncDeactivateConfiguration() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + DeactivateConfigurationRequest request = + DeactivateConfigurationRequest.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setRequestId("requestId693933066") + .build(); + Configuration response = licenseManagerClient.deactivateConfigurationAsync(request).get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_DeactivateConfiguration_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/SyncDeactivateConfigurationConfigurationname.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/SyncDeactivateConfigurationConfigurationname.java new file mode 100644 index 000000000000..b3c4a1dc0f79 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/SyncDeactivateConfigurationConfigurationname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_DeactivateConfiguration_Configurationname_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; + +public class SyncDeactivateConfigurationConfigurationname { + + public static void main(String[] args) throws Exception { + syncDeactivateConfigurationConfigurationname(); + } + + public static void syncDeactivateConfigurationConfigurationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + Configuration response = licenseManagerClient.deactivateConfigurationAsync(name).get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_DeactivateConfiguration_Configurationname_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/SyncDeactivateConfigurationString.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/SyncDeactivateConfigurationString.java new file mode 100644 index 000000000000..3de891a0efee --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deactivateconfiguration/SyncDeactivateConfigurationString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_DeactivateConfiguration_String_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; + +public class SyncDeactivateConfigurationString { + + public static void main(String[] args) throws Exception { + syncDeactivateConfigurationString(); + } + + public static void syncDeactivateConfigurationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString(); + Configuration response = licenseManagerClient.deactivateConfigurationAsync(name).get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_DeactivateConfiguration_String_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/AsyncDeleteConfiguration.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/AsyncDeleteConfiguration.java new file mode 100644 index 000000000000..47412cbe122b --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/AsyncDeleteConfiguration.java @@ -0,0 +1,52 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_DeleteConfiguration_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.DeleteConfigurationRequest; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteConfiguration { + + public static void main(String[] args) throws Exception { + asyncDeleteConfiguration(); + } + + public static void asyncDeleteConfiguration() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + DeleteConfigurationRequest request = + DeleteConfigurationRequest.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + licenseManagerClient.deleteConfigurationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_DeleteConfiguration_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/AsyncDeleteConfigurationLRO.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/AsyncDeleteConfigurationLRO.java new file mode 100644 index 000000000000..2aaf9522c46e --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/AsyncDeleteConfigurationLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_DeleteConfiguration_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.DeleteConfigurationRequest; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteConfigurationLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteConfigurationLRO(); + } + + public static void asyncDeleteConfigurationLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + DeleteConfigurationRequest request = + DeleteConfigurationRequest.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + licenseManagerClient.deleteConfigurationOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_DeleteConfiguration_LRO_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/SyncDeleteConfiguration.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/SyncDeleteConfiguration.java new file mode 100644 index 000000000000..b4058ec66911 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/SyncDeleteConfiguration.java @@ -0,0 +1,48 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_DeleteConfiguration_sync] +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.DeleteConfigurationRequest; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.protobuf.Empty; + +public class SyncDeleteConfiguration { + + public static void main(String[] args) throws Exception { + syncDeleteConfiguration(); + } + + public static void syncDeleteConfiguration() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + DeleteConfigurationRequest request = + DeleteConfigurationRequest.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setRequestId("requestId693933066") + .build(); + licenseManagerClient.deleteConfigurationAsync(request).get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_DeleteConfiguration_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/SyncDeleteConfigurationConfigurationname.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/SyncDeleteConfigurationConfigurationname.java new file mode 100644 index 000000000000..42f001ef830e --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/SyncDeleteConfigurationConfigurationname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_DeleteConfiguration_Configurationname_sync] +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.protobuf.Empty; + +public class SyncDeleteConfigurationConfigurationname { + + public static void main(String[] args) throws Exception { + syncDeleteConfigurationConfigurationname(); + } + + public static void syncDeleteConfigurationConfigurationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + licenseManagerClient.deleteConfigurationAsync(name).get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_DeleteConfiguration_Configurationname_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/SyncDeleteConfigurationString.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/SyncDeleteConfigurationString.java new file mode 100644 index 000000000000..f3d0857f4564 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/deleteconfiguration/SyncDeleteConfigurationString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_DeleteConfiguration_String_sync] +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.protobuf.Empty; + +public class SyncDeleteConfigurationString { + + public static void main(String[] args) throws Exception { + syncDeleteConfigurationString(); + } + + public static void syncDeleteConfigurationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString(); + licenseManagerClient.deleteConfigurationAsync(name).get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_DeleteConfiguration_String_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getconfiguration/AsyncGetConfiguration.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getconfiguration/AsyncGetConfiguration.java new file mode 100644 index 000000000000..f1c2c32add89 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getconfiguration/AsyncGetConfiguration.java @@ -0,0 +1,51 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_GetConfiguration_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.GetConfigurationRequest; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; + +public class AsyncGetConfiguration { + + public static void main(String[] args) throws Exception { + asyncGetConfiguration(); + } + + public static void asyncGetConfiguration() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + GetConfigurationRequest request = + GetConfigurationRequest.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .build(); + ApiFuture future = + licenseManagerClient.getConfigurationCallable().futureCall(request); + // Do something. + Configuration response = future.get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_GetConfiguration_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getconfiguration/SyncGetConfiguration.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getconfiguration/SyncGetConfiguration.java new file mode 100644 index 000000000000..82a206f238ae --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getconfiguration/SyncGetConfiguration.java @@ -0,0 +1,47 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_GetConfiguration_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.GetConfigurationRequest; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; + +public class SyncGetConfiguration { + + public static void main(String[] args) throws Exception { + syncGetConfiguration(); + } + + public static void syncGetConfiguration() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + GetConfigurationRequest request = + GetConfigurationRequest.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .build(); + Configuration response = licenseManagerClient.getConfiguration(request); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_GetConfiguration_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getconfiguration/SyncGetConfigurationConfigurationname.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getconfiguration/SyncGetConfigurationConfigurationname.java new file mode 100644 index 000000000000..813b980a1111 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getconfiguration/SyncGetConfigurationConfigurationname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_GetConfiguration_Configurationname_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; + +public class SyncGetConfigurationConfigurationname { + + public static void main(String[] args) throws Exception { + syncGetConfigurationConfigurationname(); + } + + public static void syncGetConfigurationConfigurationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + Configuration response = licenseManagerClient.getConfiguration(name); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_GetConfiguration_Configurationname_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getconfiguration/SyncGetConfigurationString.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getconfiguration/SyncGetConfigurationString.java new file mode 100644 index 000000000000..f655e751c6e5 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getconfiguration/SyncGetConfigurationString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_GetConfiguration_String_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; + +public class SyncGetConfigurationString { + + public static void main(String[] args) throws Exception { + syncGetConfigurationString(); + } + + public static void syncGetConfigurationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString(); + Configuration response = licenseManagerClient.getConfiguration(name); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_GetConfiguration_String_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getinstance/AsyncGetInstance.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getinstance/AsyncGetInstance.java new file mode 100644 index 000000000000..d3dee8d06320 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getinstance/AsyncGetInstance.java @@ -0,0 +1,49 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_GetInstance_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.licensemanager.v1.GetInstanceRequest; +import com.google.cloud.licensemanager.v1.Instance; +import com.google.cloud.licensemanager.v1.InstanceName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; + +public class AsyncGetInstance { + + public static void main(String[] args) throws Exception { + asyncGetInstance(); + } + + public static void asyncGetInstance() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + GetInstanceRequest request = + GetInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + ApiFuture future = licenseManagerClient.getInstanceCallable().futureCall(request); + // Do something. + Instance response = future.get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_GetInstance_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getinstance/SyncGetInstance.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getinstance/SyncGetInstance.java new file mode 100644 index 000000000000..6502b86ff163 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getinstance/SyncGetInstance.java @@ -0,0 +1,46 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_GetInstance_sync] +import com.google.cloud.licensemanager.v1.GetInstanceRequest; +import com.google.cloud.licensemanager.v1.Instance; +import com.google.cloud.licensemanager.v1.InstanceName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; + +public class SyncGetInstance { + + public static void main(String[] args) throws Exception { + syncGetInstance(); + } + + public static void syncGetInstance() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + GetInstanceRequest request = + GetInstanceRequest.newBuilder() + .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .build(); + Instance response = licenseManagerClient.getInstance(request); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_GetInstance_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getinstance/SyncGetInstanceInstancename.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getinstance/SyncGetInstanceInstancename.java new file mode 100644 index 000000000000..66ef30291fa0 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getinstance/SyncGetInstanceInstancename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_GetInstance_Instancename_sync] +import com.google.cloud.licensemanager.v1.Instance; +import com.google.cloud.licensemanager.v1.InstanceName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; + +public class SyncGetInstanceInstancename { + + public static void main(String[] args) throws Exception { + syncGetInstanceInstancename(); + } + + public static void syncGetInstanceInstancename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + Instance response = licenseManagerClient.getInstance(name); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_GetInstance_Instancename_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getinstance/SyncGetInstanceString.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getinstance/SyncGetInstanceString.java new file mode 100644 index 000000000000..90a74a7cd08b --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getinstance/SyncGetInstanceString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_GetInstance_String_sync] +import com.google.cloud.licensemanager.v1.Instance; +import com.google.cloud.licensemanager.v1.InstanceName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; + +public class SyncGetInstanceString { + + public static void main(String[] args) throws Exception { + syncGetInstanceString(); + } + + public static void syncGetInstanceString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + Instance response = licenseManagerClient.getInstance(name); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_GetInstance_String_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getlocation/AsyncGetLocation.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..3d0424eb9b03 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = licenseManagerClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_GetLocation_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getlocation/SyncGetLocation.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..b66aaad6d30f --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_GetLocation_sync] +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = licenseManagerClient.getLocation(request); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_GetLocation_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getproduct/AsyncGetProduct.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getproduct/AsyncGetProduct.java new file mode 100644 index 000000000000..59af5fb3a270 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getproduct/AsyncGetProduct.java @@ -0,0 +1,49 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_GetProduct_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.licensemanager.v1.GetProductRequest; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.Product; +import com.google.cloud.licensemanager.v1.ProductName; + +public class AsyncGetProduct { + + public static void main(String[] args) throws Exception { + asyncGetProduct(); + } + + public static void asyncGetProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + GetProductRequest request = + GetProductRequest.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + ApiFuture future = licenseManagerClient.getProductCallable().futureCall(request); + // Do something. + Product response = future.get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_GetProduct_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getproduct/SyncGetProduct.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getproduct/SyncGetProduct.java new file mode 100644 index 000000000000..32a40553c4da --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getproduct/SyncGetProduct.java @@ -0,0 +1,46 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_GetProduct_sync] +import com.google.cloud.licensemanager.v1.GetProductRequest; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.Product; +import com.google.cloud.licensemanager.v1.ProductName; + +public class SyncGetProduct { + + public static void main(String[] args) throws Exception { + syncGetProduct(); + } + + public static void syncGetProduct() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + GetProductRequest request = + GetProductRequest.newBuilder() + .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString()) + .build(); + Product response = licenseManagerClient.getProduct(request); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_GetProduct_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getproduct/SyncGetProductProductname.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getproduct/SyncGetProductProductname.java new file mode 100644 index 000000000000..a6bd53d6db34 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getproduct/SyncGetProductProductname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_GetProduct_Productname_sync] +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.Product; +import com.google.cloud.licensemanager.v1.ProductName; + +public class SyncGetProductProductname { + + public static void main(String[] args) throws Exception { + syncGetProductProductname(); + } + + public static void syncGetProductProductname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]"); + Product response = licenseManagerClient.getProduct(name); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_GetProduct_Productname_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getproduct/SyncGetProductString.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getproduct/SyncGetProductString.java new file mode 100644 index 000000000000..34b9c31a4907 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/getproduct/SyncGetProductString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_GetProduct_String_sync] +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.Product; +import com.google.cloud.licensemanager.v1.ProductName; + +public class SyncGetProductString { + + public static void main(String[] args) throws Exception { + syncGetProductString(); + } + + public static void syncGetProductString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString(); + Product response = licenseManagerClient.getProduct(name); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_GetProduct_String_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/AsyncListConfigurations.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/AsyncListConfigurations.java new file mode 100644 index 000000000000..ad492556b294 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/AsyncListConfigurations.java @@ -0,0 +1,56 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListConfigurations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.ListConfigurationsRequest; +import com.google.cloud.licensemanager.v1.LocationName; + +public class AsyncListConfigurations { + + public static void main(String[] args) throws Exception { + asyncListConfigurations(); + } + + public static void asyncListConfigurations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ListConfigurationsRequest request = + ListConfigurationsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + licenseManagerClient.listConfigurationsPagedCallable().futureCall(request); + // Do something. + for (Configuration element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListConfigurations_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/AsyncListConfigurationsPaged.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/AsyncListConfigurationsPaged.java new file mode 100644 index 000000000000..986554a8708c --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/AsyncListConfigurationsPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListConfigurations_Paged_async] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.ListConfigurationsRequest; +import com.google.cloud.licensemanager.v1.ListConfigurationsResponse; +import com.google.cloud.licensemanager.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListConfigurationsPaged { + + public static void main(String[] args) throws Exception { + asyncListConfigurationsPaged(); + } + + public static void asyncListConfigurationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ListConfigurationsRequest request = + ListConfigurationsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListConfigurationsResponse response = + licenseManagerClient.listConfigurationsCallable().call(request); + for (Configuration element : response.getConfigurationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListConfigurations_Paged_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/SyncListConfigurations.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/SyncListConfigurations.java new file mode 100644 index 000000000000..6e60acbb4566 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/SyncListConfigurations.java @@ -0,0 +1,52 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListConfigurations_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.ListConfigurationsRequest; +import com.google.cloud.licensemanager.v1.LocationName; + +public class SyncListConfigurations { + + public static void main(String[] args) throws Exception { + syncListConfigurations(); + } + + public static void syncListConfigurations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ListConfigurationsRequest request = + ListConfigurationsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Configuration element : licenseManagerClient.listConfigurations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListConfigurations_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/SyncListConfigurationsLocationname.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/SyncListConfigurationsLocationname.java new file mode 100644 index 000000000000..37e9cdf59cc2 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/SyncListConfigurationsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListConfigurations_Locationname_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.LocationName; + +public class SyncListConfigurationsLocationname { + + public static void main(String[] args) throws Exception { + syncListConfigurationsLocationname(); + } + + public static void syncListConfigurationsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Configuration element : licenseManagerClient.listConfigurations(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListConfigurations_Locationname_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/SyncListConfigurationsString.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/SyncListConfigurationsString.java new file mode 100644 index 000000000000..2f298be54d92 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listconfigurations/SyncListConfigurationsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListConfigurations_String_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.LocationName; + +public class SyncListConfigurationsString { + + public static void main(String[] args) throws Exception { + syncListConfigurationsString(); + } + + public static void syncListConfigurationsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Configuration element : licenseManagerClient.listConfigurations(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListConfigurations_String_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/AsyncListInstances.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/AsyncListInstances.java new file mode 100644 index 000000000000..cbe19627f7d2 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/AsyncListInstances.java @@ -0,0 +1,56 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListInstances_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.licensemanager.v1.Instance; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.ListInstancesRequest; +import com.google.cloud.licensemanager.v1.LocationName; + +public class AsyncListInstances { + + public static void main(String[] args) throws Exception { + asyncListInstances(); + } + + public static void asyncListInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + licenseManagerClient.listInstancesPagedCallable().futureCall(request); + // Do something. + for (Instance element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListInstances_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/AsyncListInstancesPaged.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/AsyncListInstancesPaged.java new file mode 100644 index 000000000000..f345c9c231e6 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/AsyncListInstancesPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListInstances_Paged_async] +import com.google.cloud.licensemanager.v1.Instance; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.ListInstancesRequest; +import com.google.cloud.licensemanager.v1.ListInstancesResponse; +import com.google.cloud.licensemanager.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListInstancesPaged { + + public static void main(String[] args) throws Exception { + asyncListInstancesPaged(); + } + + public static void asyncListInstancesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListInstancesResponse response = licenseManagerClient.listInstancesCallable().call(request); + for (Instance element : response.getInstancesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListInstances_Paged_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/SyncListInstances.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/SyncListInstances.java new file mode 100644 index 000000000000..2e09f365bc6a --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/SyncListInstances.java @@ -0,0 +1,52 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListInstances_sync] +import com.google.cloud.licensemanager.v1.Instance; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.ListInstancesRequest; +import com.google.cloud.licensemanager.v1.LocationName; + +public class SyncListInstances { + + public static void main(String[] args) throws Exception { + syncListInstances(); + } + + public static void syncListInstances() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Instance element : licenseManagerClient.listInstances(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListInstances_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/SyncListInstancesLocationname.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/SyncListInstancesLocationname.java new file mode 100644 index 000000000000..d1d4f862be5f --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/SyncListInstancesLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListInstances_Locationname_sync] +import com.google.cloud.licensemanager.v1.Instance; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.LocationName; + +public class SyncListInstancesLocationname { + + public static void main(String[] args) throws Exception { + syncListInstancesLocationname(); + } + + public static void syncListInstancesLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Instance element : licenseManagerClient.listInstances(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListInstances_Locationname_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/SyncListInstancesString.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/SyncListInstancesString.java new file mode 100644 index 000000000000..ce649f635144 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listinstances/SyncListInstancesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListInstances_String_sync] +import com.google.cloud.licensemanager.v1.Instance; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.LocationName; + +public class SyncListInstancesString { + + public static void main(String[] args) throws Exception { + syncListInstancesString(); + } + + public static void syncListInstancesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Instance element : licenseManagerClient.listInstances(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListInstances_String_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listlocations/AsyncListLocations.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..28b0a2ab0d1a --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + licenseManagerClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListLocations_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listlocations/AsyncListLocationsPaged.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..5c551ee30529 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListLocations_Paged_async] +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = licenseManagerClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListLocations_Paged_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listlocations/SyncListLocations.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..b9cb0cf0ffea --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListLocations_sync] +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : licenseManagerClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListLocations_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/AsyncListProducts.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/AsyncListProducts.java new file mode 100644 index 000000000000..d8bb34e3fdaf --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/AsyncListProducts.java @@ -0,0 +1,56 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListProducts_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.ListProductsRequest; +import com.google.cloud.licensemanager.v1.LocationName; +import com.google.cloud.licensemanager.v1.Product; + +public class AsyncListProducts { + + public static void main(String[] args) throws Exception { + asyncListProducts(); + } + + public static void asyncListProducts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + licenseManagerClient.listProductsPagedCallable().futureCall(request); + // Do something. + for (Product element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListProducts_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/AsyncListProductsPaged.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/AsyncListProductsPaged.java new file mode 100644 index 000000000000..9b5c15b65091 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/AsyncListProductsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListProducts_Paged_async] +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.ListProductsRequest; +import com.google.cloud.licensemanager.v1.ListProductsResponse; +import com.google.cloud.licensemanager.v1.LocationName; +import com.google.cloud.licensemanager.v1.Product; +import com.google.common.base.Strings; + +public class AsyncListProductsPaged { + + public static void main(String[] args) throws Exception { + asyncListProductsPaged(); + } + + public static void asyncListProductsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListProductsResponse response = licenseManagerClient.listProductsCallable().call(request); + for (Product element : response.getProductsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListProducts_Paged_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/SyncListProducts.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/SyncListProducts.java new file mode 100644 index 000000000000..763b16ae9e7c --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/SyncListProducts.java @@ -0,0 +1,52 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListProducts_sync] +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.ListProductsRequest; +import com.google.cloud.licensemanager.v1.LocationName; +import com.google.cloud.licensemanager.v1.Product; + +public class SyncListProducts { + + public static void main(String[] args) throws Exception { + syncListProducts(); + } + + public static void syncListProducts() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Product element : licenseManagerClient.listProducts(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListProducts_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/SyncListProductsLocationname.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/SyncListProductsLocationname.java new file mode 100644 index 000000000000..1709d4845699 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/SyncListProductsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListProducts_Locationname_sync] +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.LocationName; +import com.google.cloud.licensemanager.v1.Product; + +public class SyncListProductsLocationname { + + public static void main(String[] args) throws Exception { + syncListProductsLocationname(); + } + + public static void syncListProductsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Product element : licenseManagerClient.listProducts(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListProducts_Locationname_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/SyncListProductsString.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/SyncListProductsString.java new file mode 100644 index 000000000000..ed44a6c81b99 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/listproducts/SyncListProductsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ListProducts_String_sync] +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.LocationName; +import com.google.cloud.licensemanager.v1.Product; + +public class SyncListProductsString { + + public static void main(String[] args) throws Exception { + syncListProductsString(); + } + + public static void syncListProductsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Product element : licenseManagerClient.listProducts(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ListProducts_String_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/queryconfigurationlicenseusage/AsyncQueryConfigurationLicenseUsage.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/queryconfigurationlicenseusage/AsyncQueryConfigurationLicenseUsage.java new file mode 100644 index 000000000000..7692135dbd90 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/queryconfigurationlicenseusage/AsyncQueryConfigurationLicenseUsage.java @@ -0,0 +1,54 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_QueryConfigurationLicenseUsage_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest; +import com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse; +import com.google.protobuf.Timestamp; + +public class AsyncQueryConfigurationLicenseUsage { + + public static void main(String[] args) throws Exception { + asyncQueryConfigurationLicenseUsage(); + } + + public static void asyncQueryConfigurationLicenseUsage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + QueryConfigurationLicenseUsageRequest request = + QueryConfigurationLicenseUsageRequest.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + ApiFuture future = + licenseManagerClient.queryConfigurationLicenseUsageCallable().futureCall(request); + // Do something. + QueryConfigurationLicenseUsageResponse response = future.get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_QueryConfigurationLicenseUsage_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/queryconfigurationlicenseusage/SyncQueryConfigurationLicenseUsage.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/queryconfigurationlicenseusage/SyncQueryConfigurationLicenseUsage.java new file mode 100644 index 000000000000..19d7c6f73fa6 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/queryconfigurationlicenseusage/SyncQueryConfigurationLicenseUsage.java @@ -0,0 +1,51 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_QueryConfigurationLicenseUsage_sync] +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest; +import com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse; +import com.google.protobuf.Timestamp; + +public class SyncQueryConfigurationLicenseUsage { + + public static void main(String[] args) throws Exception { + syncQueryConfigurationLicenseUsage(); + } + + public static void syncQueryConfigurationLicenseUsage() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + QueryConfigurationLicenseUsageRequest request = + QueryConfigurationLicenseUsageRequest.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + QueryConfigurationLicenseUsageResponse response = + licenseManagerClient.queryConfigurationLicenseUsage(request); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_QueryConfigurationLicenseUsage_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/queryconfigurationlicenseusage/SyncQueryConfigurationLicenseUsageConfigurationnameTimestampTimestamp.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/queryconfigurationlicenseusage/SyncQueryConfigurationLicenseUsageConfigurationnameTimestampTimestamp.java new file mode 100644 index 000000000000..cdb92a665a4b --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/queryconfigurationlicenseusage/SyncQueryConfigurationLicenseUsageConfigurationnameTimestampTimestamp.java @@ -0,0 +1,47 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_QueryConfigurationLicenseUsage_ConfigurationnameTimestampTimestamp_sync] +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse; +import com.google.protobuf.Timestamp; + +public class SyncQueryConfigurationLicenseUsageConfigurationnameTimestampTimestamp { + + public static void main(String[] args) throws Exception { + syncQueryConfigurationLicenseUsageConfigurationnameTimestampTimestamp(); + } + + public static void syncQueryConfigurationLicenseUsageConfigurationnameTimestampTimestamp() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + QueryConfigurationLicenseUsageResponse response = + licenseManagerClient.queryConfigurationLicenseUsage(name, startTime, endTime); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_QueryConfigurationLicenseUsage_ConfigurationnameTimestampTimestamp_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/queryconfigurationlicenseusage/SyncQueryConfigurationLicenseUsageStringTimestampTimestamp.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/queryconfigurationlicenseusage/SyncQueryConfigurationLicenseUsageStringTimestampTimestamp.java new file mode 100644 index 000000000000..2a3884c3080a --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/queryconfigurationlicenseusage/SyncQueryConfigurationLicenseUsageStringTimestampTimestamp.java @@ -0,0 +1,46 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_QueryConfigurationLicenseUsage_StringTimestampTimestamp_sync] +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse; +import com.google.protobuf.Timestamp; + +public class SyncQueryConfigurationLicenseUsageStringTimestampTimestamp { + + public static void main(String[] args) throws Exception { + syncQueryConfigurationLicenseUsageStringTimestampTimestamp(); + } + + public static void syncQueryConfigurationLicenseUsageStringTimestampTimestamp() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString(); + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + QueryConfigurationLicenseUsageResponse response = + licenseManagerClient.queryConfigurationLicenseUsage(name, startTime, endTime); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_QueryConfigurationLicenseUsage_StringTimestampTimestamp_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/AsyncReactivateConfiguration.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/AsyncReactivateConfiguration.java new file mode 100644 index 000000000000..ad2c25212baf --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/AsyncReactivateConfiguration.java @@ -0,0 +1,52 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ReactivateConfiguration_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest; +import com.google.longrunning.Operation; + +public class AsyncReactivateConfiguration { + + public static void main(String[] args) throws Exception { + asyncReactivateConfiguration(); + } + + public static void asyncReactivateConfiguration() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ReactivateConfigurationRequest request = + ReactivateConfigurationRequest.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + licenseManagerClient.reactivateConfigurationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ReactivateConfiguration_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/AsyncReactivateConfigurationLRO.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/AsyncReactivateConfigurationLRO.java new file mode 100644 index 000000000000..8853bb95b4b4 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/AsyncReactivateConfigurationLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ReactivateConfiguration_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.OperationMetadata; +import com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest; + +public class AsyncReactivateConfigurationLRO { + + public static void main(String[] args) throws Exception { + asyncReactivateConfigurationLRO(); + } + + public static void asyncReactivateConfigurationLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ReactivateConfigurationRequest request = + ReactivateConfigurationRequest.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + licenseManagerClient.reactivateConfigurationOperationCallable().futureCall(request); + // Do something. + Configuration response = future.get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ReactivateConfiguration_LRO_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/SyncReactivateConfiguration.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/SyncReactivateConfiguration.java new file mode 100644 index 000000000000..7904f760e953 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/SyncReactivateConfiguration.java @@ -0,0 +1,48 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ReactivateConfiguration_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.ReactivateConfigurationRequest; + +public class SyncReactivateConfiguration { + + public static void main(String[] args) throws Exception { + syncReactivateConfiguration(); + } + + public static void syncReactivateConfiguration() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ReactivateConfigurationRequest request = + ReactivateConfigurationRequest.newBuilder() + .setName( + ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString()) + .setRequestId("requestId693933066") + .build(); + Configuration response = licenseManagerClient.reactivateConfigurationAsync(request).get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ReactivateConfiguration_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/SyncReactivateConfigurationConfigurationname.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/SyncReactivateConfigurationConfigurationname.java new file mode 100644 index 000000000000..7040c4171026 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/SyncReactivateConfigurationConfigurationname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ReactivateConfiguration_Configurationname_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; + +public class SyncReactivateConfigurationConfigurationname { + + public static void main(String[] args) throws Exception { + syncReactivateConfigurationConfigurationname(); + } + + public static void syncReactivateConfigurationConfigurationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]"); + Configuration response = licenseManagerClient.reactivateConfigurationAsync(name).get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ReactivateConfiguration_Configurationname_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/SyncReactivateConfigurationString.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/SyncReactivateConfigurationString.java new file mode 100644 index 000000000000..8373361bac1a --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/reactivateconfiguration/SyncReactivateConfigurationString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_ReactivateConfiguration_String_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.ConfigurationName; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; + +public class SyncReactivateConfigurationString { + + public static void main(String[] args) throws Exception { + syncReactivateConfigurationString(); + } + + public static void syncReactivateConfigurationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString(); + Configuration response = licenseManagerClient.reactivateConfigurationAsync(name).get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_ReactivateConfiguration_String_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/updateconfiguration/AsyncUpdateConfiguration.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/updateconfiguration/AsyncUpdateConfiguration.java new file mode 100644 index 000000000000..53472f1a73b7 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/updateconfiguration/AsyncUpdateConfiguration.java @@ -0,0 +1,53 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_UpdateConfiguration_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.UpdateConfigurationRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateConfiguration { + + public static void main(String[] args) throws Exception { + asyncUpdateConfiguration(); + } + + public static void asyncUpdateConfiguration() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + UpdateConfigurationRequest request = + UpdateConfigurationRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setConfiguration(Configuration.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + licenseManagerClient.updateConfigurationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_UpdateConfiguration_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/updateconfiguration/AsyncUpdateConfigurationLRO.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/updateconfiguration/AsyncUpdateConfigurationLRO.java new file mode 100644 index 000000000000..ac5a243c9512 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/updateconfiguration/AsyncUpdateConfigurationLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_UpdateConfiguration_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.OperationMetadata; +import com.google.cloud.licensemanager.v1.UpdateConfigurationRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateConfigurationLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateConfigurationLRO(); + } + + public static void asyncUpdateConfigurationLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + UpdateConfigurationRequest request = + UpdateConfigurationRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setConfiguration(Configuration.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + licenseManagerClient.updateConfigurationOperationCallable().futureCall(request); + // Do something. + Configuration response = future.get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_UpdateConfiguration_LRO_async] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/updateconfiguration/SyncUpdateConfiguration.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/updateconfiguration/SyncUpdateConfiguration.java new file mode 100644 index 000000000000..a3300fe36a16 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/updateconfiguration/SyncUpdateConfiguration.java @@ -0,0 +1,48 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_UpdateConfiguration_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.cloud.licensemanager.v1.UpdateConfigurationRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateConfiguration { + + public static void main(String[] args) throws Exception { + syncUpdateConfiguration(); + } + + public static void syncUpdateConfiguration() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + UpdateConfigurationRequest request = + UpdateConfigurationRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setConfiguration(Configuration.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Configuration response = licenseManagerClient.updateConfigurationAsync(request).get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_UpdateConfiguration_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/updateconfiguration/SyncUpdateConfigurationConfigurationFieldmask.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/updateconfiguration/SyncUpdateConfigurationConfigurationFieldmask.java new file mode 100644 index 000000000000..64e07b42a8a9 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanager/updateconfiguration/SyncUpdateConfigurationConfigurationFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManager_UpdateConfiguration_ConfigurationFieldmask_sync] +import com.google.cloud.licensemanager.v1.Configuration; +import com.google.cloud.licensemanager.v1.LicenseManagerClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateConfigurationConfigurationFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateConfigurationConfigurationFieldmask(); + } + + public static void syncUpdateConfigurationConfigurationFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) { + Configuration configuration = Configuration.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Configuration response = + licenseManagerClient.updateConfigurationAsync(configuration, updateMask).get(); + } + } +} +// [END licensemanager_v1_generated_LicenseManager_UpdateConfiguration_ConfigurationFieldmask_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanagersettings/createconfiguration/SyncCreateConfiguration.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanagersettings/createconfiguration/SyncCreateConfiguration.java new file mode 100644 index 000000000000..def1d4c8c5ce --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanagersettings/createconfiguration/SyncCreateConfiguration.java @@ -0,0 +1,54 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManagerSettings_CreateConfiguration_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.licensemanager.v1.LicenseManagerSettings; +import java.time.Duration; + +public class SyncCreateConfiguration { + + public static void main(String[] args) throws Exception { + syncCreateConfiguration(); + } + + public static void syncCreateConfiguration() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LicenseManagerSettings.Builder licenseManagerSettingsBuilder = + LicenseManagerSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + licenseManagerSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END licensemanager_v1_generated_LicenseManagerSettings_CreateConfiguration_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanagersettings/getconfiguration/SyncGetConfiguration.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanagersettings/getconfiguration/SyncGetConfiguration.java new file mode 100644 index 000000000000..91e8ef784856 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/licensemanagersettings/getconfiguration/SyncGetConfiguration.java @@ -0,0 +1,56 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.samples; + +// [START licensemanager_v1_generated_LicenseManagerSettings_GetConfiguration_sync] +import com.google.cloud.licensemanager.v1.LicenseManagerSettings; +import java.time.Duration; + +public class SyncGetConfiguration { + + public static void main(String[] args) throws Exception { + syncGetConfiguration(); + } + + public static void syncGetConfiguration() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LicenseManagerSettings.Builder licenseManagerSettingsBuilder = + LicenseManagerSettings.newBuilder(); + licenseManagerSettingsBuilder + .getConfigurationSettings() + .setRetrySettings( + licenseManagerSettingsBuilder + .getConfigurationSettings() + .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()); + LicenseManagerSettings licenseManagerSettings = licenseManagerSettingsBuilder.build(); + } +} +// [END licensemanager_v1_generated_LicenseManagerSettings_GetConfiguration_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/stub/licensemanagerstubsettings/createconfiguration/SyncCreateConfiguration.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/stub/licensemanagerstubsettings/createconfiguration/SyncCreateConfiguration.java new file mode 100644 index 000000000000..fc622594efa5 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/stub/licensemanagerstubsettings/createconfiguration/SyncCreateConfiguration.java @@ -0,0 +1,54 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.stub.samples; + +// [START licensemanager_v1_generated_LicenseManagerStubSettings_CreateConfiguration_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.licensemanager.v1.stub.LicenseManagerStubSettings; +import java.time.Duration; + +public class SyncCreateConfiguration { + + public static void main(String[] args) throws Exception { + syncCreateConfiguration(); + } + + public static void syncCreateConfiguration() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LicenseManagerStubSettings.Builder licenseManagerSettingsBuilder = + LicenseManagerStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + licenseManagerSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END licensemanager_v1_generated_LicenseManagerStubSettings_CreateConfiguration_sync] diff --git a/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/stub/licensemanagerstubsettings/getconfiguration/SyncGetConfiguration.java b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/stub/licensemanagerstubsettings/getconfiguration/SyncGetConfiguration.java new file mode 100644 index 000000000000..d625fe2ed126 --- /dev/null +++ b/java-licensemanager/samples/snippets/generated/com/google/cloud/licensemanager/v1/stub/licensemanagerstubsettings/getconfiguration/SyncGetConfiguration.java @@ -0,0 +1,56 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.licensemanager.v1.stub.samples; + +// [START licensemanager_v1_generated_LicenseManagerStubSettings_GetConfiguration_sync] +import com.google.cloud.licensemanager.v1.stub.LicenseManagerStubSettings; +import java.time.Duration; + +public class SyncGetConfiguration { + + public static void main(String[] args) throws Exception { + syncGetConfiguration(); + } + + public static void syncGetConfiguration() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + LicenseManagerStubSettings.Builder licenseManagerSettingsBuilder = + LicenseManagerStubSettings.newBuilder(); + licenseManagerSettingsBuilder + .getConfigurationSettings() + .setRetrySettings( + licenseManagerSettingsBuilder + .getConfigurationSettings() + .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()); + LicenseManagerStubSettings licenseManagerSettings = licenseManagerSettingsBuilder.build(); + } +} +// [END licensemanager_v1_generated_LicenseManagerStubSettings_GetConfiguration_sync] diff --git a/pom.xml b/pom.xml index b2ae795a4441..208f60ef334b 100644 --- a/pom.xml +++ b/pom.xml @@ -121,6 +121,7 @@ java-kms java-kmsinventory java-language + java-licensemanager java-life-sciences java-lustre java-maintenance diff --git a/versions.txt b/versions.txt index 2e61e6b1c5f2..5c58aa0c3307 100644 --- a/versions.txt +++ b/versions.txt @@ -867,3 +867,6 @@ grpc-google-cloud-maintenance-v1beta:0.1.0:0.2.0-SNAPSHOT google-cloud-configdelivery:0.1.0:0.2.0-SNAPSHOT proto-google-cloud-configdelivery-v1beta:0.1.0:0.2.0-SNAPSHOT grpc-google-cloud-configdelivery-v1beta:0.1.0:0.2.0-SNAPSHOT +google-cloud-licensemanager:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-licensemanager-v1:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-licensemanager-v1:0.0.0:0.0.1-SNAPSHOT From a38646073854499e3e0e405bd36ecbe7fa29d8d3 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Fri, 11 Jul 2025 19:50:36 +0000 Subject: [PATCH 3/4] chore: generate libraries at Fri Jul 11 19:48:57 UTC 2025 --- java-licensemanager/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-licensemanager/pom.xml b/java-licensemanager/pom.xml index ef16ea12fe7a..b21e01dcd8a2 100644 --- a/java-licensemanager/pom.xml +++ b/java-licensemanager/pom.xml @@ -52,4 +52,4 @@ google-cloud-licensemanager-bom - + From 778a5ae904d7038de63939608f7490e5a6e4dc5b Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Fri, 11 Jul 2025 20:25:48 +0000 Subject: [PATCH 4/4] chore: generate libraries at Fri Jul 11 20:24:06 UTC 2025 --- versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.txt b/versions.txt index a4c280ba00fe..a34b805ea116 100644 --- a/versions.txt +++ b/versions.txt @@ -871,4 +871,4 @@ google-cloud-licensemanager:0.0.0:0.0.1-SNAPSHOT proto-google-cloud-licensemanager-v1:0.0.0:0.0.1-SNAPSHOT grpc-google-cloud-licensemanager-v1:0.0.0:0.0.1-SNAPSHOT proto-google-shopping-merchant-reports-v1alpha:0.43.0:0.44.0-SNAPSHOT -grpc-google-shopping-merchant-reports-v1alpha:0.43.0:0.44.0-SNAPSHOT \ No newline at end of file +grpc-google-shopping-merchant-reports-v1alpha:0.43.0:0.44.0-SNAPSHOT